bookmarklet

How are bookmarklets( javascript in a link ) verfied by servers? How is security kept?

廉价感情. 提交于 2020-01-14 04:56:08
问题 I've been trying to access different domains from my JavaScript ( to pull the page title ) but can not b.c. of the same-origin policy. What I realized is that JavaScript "installed" into the browser via bookmarklets is not restrained by this policy. This got me to wondering how security is kept...for example delicious bookmarklets...I can just modify them and start ajaxing delicous.com...I don't plan on doing this but likewise someone could do this to a bookmarklet that I create. How do you

Javascript bookmark stopped working in Firefox 13

风流意气都作罢 提交于 2020-01-12 12:52:26
问题 In Firefox version 13, bookmarklets (bookmarks with a javascript: URL, e.g. javascript: alert("it works") stopped working. Is there any solution to use javascript: bookmarks in Firefox 13? 回答1: This is a consequence of Bug 728313 - Using a bookmark keyword to a bookmarklet fails on new tabs, also Bug 739387 - Aurora 13a New Tab display doesn't allow javascript bookmarks to be selected . This bug affects Firefox 13 onwards. As a consequence of the fix to bug 723808, javascript: bookmarks are

Programmatically temporarily altering a Google Docs and then replacing with the pre-altered version

做~自己de王妃 提交于 2020-01-07 07:43:49
问题 I am trying to do the following, which would seem to be a straightforward task. After 2 weeks of trying various approaches, I am still failing at Step 4: Starting with an existing Google Doc (Gdoc) file, programmatically accept all suggested changes, and then export file as a text file (this step goes quickly), and then undo the temporary changes so that file is identical to how it started out in Step 1. My approach (see attached code) was to write a JavaScript (which I have made into a

open pop up after clicking bookmark link

随声附和 提交于 2020-01-06 17:58:53
问题 I am working on a short application. In which I have followiing things. move a link something from my page to Bookmark Toolbar of Browser- Done. After clicking on the bookmark link pop should open. (user can be at any other website). he will click on the bookmark link and then pop up should open -- NOT DONE that pop should fetch the title,meta,description of parent window (users current opened website).-- DONE Obviously My question is about 2 Point . I cant figure out how to make this

javascript: long click for a bookmarklet

有些话、适合烂在心里 提交于 2020-01-03 19:04:51
问题 I need to recognize a long click in a JavaScript bookmarklet. So, I cannot use jQuery, neither onclick() event and similar. Is it possible, and how? 回答1: onmousedown , call setTimeout() for the duration of your long click. If the timeout is allowed to expire, it will call its function to do whatever you hoped to do on the long click. However, onmouseup you cancel the setTimeout() if it has not yet expired. <script type='text/javascript'> // t will hold the setTimeout id // Click for 1 second