bookmarklet

Bookmarklet wait until Javascript is loaded

I've got a bookmarklet which loads jQuery and some other js libraries. How do I: Wait until the javascript library I'm using is available/loaded. If I try to use the script before it has finished loading, like using the $ function with jQuery before it's loaded, an undefined exception is thrown. Insure that the bookmarklet I load won...

Is there a way to have browsers ignore or override xml-stylesheet processing instructions?

I'm trying to write a bookmarklet to help some QA testers submit useful debugging information when they come across issues. Currently I can set window.location to a URL that provides this debugging information, but this resource is an XML document with an xml-stylesheet processing directive. It would actually be more convenient if the t...

Date bookmarklet needs leading zero on single digit months and days

I have a bookmarklet I use to check daily log files. However the bookmarklet I use only delivers the month and day in single digits, however the log files use double digits. For example my bookmarklet delivers: http://url/log/2009-5-4_localcontrol-story.log, while the log file actually lives at: http://url/log/2009-05-04_localcontrol-st...

Does execCommand SaveAs work in firefox?

Why does this not work in ff/chrome? javascript: document.execCommand('SaveAs','true','http://www.google.com'); (used as a bookmarklet) ...

Injecting a javascript file with the fewest possible characters?

I'm working on a bookmarklet, and thought I'd throw down a challenge: how to inject an external javascript file from a link in as few characters as possible. Here's the shortest I was able to come up with: javascript:(function(d){d.body.appendChild(d.createElement('script')).src='URL'})(document) That's 88 characters without the URL....

Why does this bookmarklet JS code not work when put in an onclick handler?

I have a pretty typical bookmarklet code that's working perfectly for me in all browsers. However, when I take this code and put it in an HTML's element onClick handler, it doesn't work in IE (6, 7, or 8). This is the code: javascript: ( function(){ function l(i,u){ var d=document; var s; try{ s=d.standardCreateElement(...

how can i get links on page that have a certain word in them with javascript

I am trying to get the link that contains a word on a page and refresh them to another page, in a bookmarklet. Here is the code I am not getting to work for a bookmarklet: javascript: for (i=0; i < document.links.length; i++) { if(document.links[i].href.match('exampleword')) { location.href = 'http://google.com/exam...

bookmarklet to get full path to an image

I'm working on a bookmarklet that gives the full path to an image when you click on any image on a web page. The image is then downloaded on our servers, and we do business stuff to it. Currently, the script parses out the src attribute using jQuery, then has some dumb logic that usually works, but quite often it does not. Now, I could...

How to dynamically load Javascript files and use them right away ?

I am using JQuery to inject dynamically script tags in the body tab of a webpage. I got something like : function addJS(url) { $("body").append('<script type="text/javascript" src='+url+'></script>'); } I add several scripts this way, and try to use them right after. E.G : lib.js function core() {...} alert("I'am here !"); in...

Top of Page Javascript Bookmarklet

Can anyone tell me how to turn <a href="javascript:scroll(0,0)"> Top</a> aka the Top of Page link into a Bookmarklet. Not very knowledgeable with JavaScript and cannot get this into want I want it to be. Or if I am using the wrong code, then can you fix it for me and turn it into the bookmarklet. ...

Create a favicon for a link that is JavaScript?

I have a link on my site that is strictly JavaScript, that the users can optionally drag to their browser's link bar. Because there is no associated site with a Favicon, the link always gets a blank icon. Is there anyway to associate a Favicon with it at the time the user drags it? I am primarily interested in a Firefox solution, but IE ...

How to make a div pop up using a bookmarklet?

How to make a bookmarklet where there's a div that pops up in the middle of the screen? Seems very simple, i just can't get it down. ...

How to get javascript to load another html file?

I am trying to create a bookmarklet, so that when you click on it, it will load example.com/yourdata.php in a div box. How can I make it get the data from example.com? IFRAME? or is there a better solution? ...

javascript prompt for password (i.e. *******)

I'm writing a bookmarklet and I need to be able to prompt the user for a "password". However, I don't want it to be in clear text on screen, so I cannot use prompt. Is there a masked alternative to prompt()? Any other suggestion? ...

using selenium-rc can i load a page, click a bookmarklet, and fill up the in-page loaded form ?

Is there anyway by which I can automate the following steps in Selenium-rc open a page click on bookmarklet in browser toolbar fill up data in the form loaded into the page by said bookmarklet. If the bookmarklet is not accessible as it is part of the browser/bookmark toolbar, is there a way in which I can inject the javascript into ...

bookmarklet that detects whether the current page is a result of a GET request or a POST request

I am trying to make a bookmarklet, which will be used only in Firefox 3. I want it to do one thing if the page it is used on was the result of a GET request, and another thing if it was produced after submitting a POST request. Specifically, I am trying to determine whether I can pull up the same page by accessing the URL that is in the ...

How do I get this "Share" button to grab the current URL's HTML title in addition to URL?

I'm a javascript novice trying to build a basic share button as a learning project. I'm a bit stumped about one aspect. While I can grab the URL of the current page and pass that into the url that prepopulates the share form, I'm not sure how to grab the html title. Here's what I have to far: <a href="http://www.domain.com/submit" on...

Firefox javascript bookmarklet open tab in background

I've written a bookmarklet to look a word up in a Chinese dictionary: javascript:Qr=document.getSelection();if(!Qr){void(Qr=prompt('%E8%AF%8D%E8%AF%AD',''))};if(Qr)(function(){window.open('http://nciku.com/search/all/'+Qr);})(); This opens a new tab with search results for your selected word or a word you type in at the prompt. Is the...

Bookmarklet: Load external site html

Hey guys, how can i load the html from an external site? (cross domain) ...

js: Load html of a page from a different domain.

Hello guys, i was wondering how can i load the html code of a page, hosted on a different domain? I am using javascript, and want to create a bookmarklet that will enable me to parse the external html code. i have been googling for hourse in vain... thank you very much ...