bookmarklet

Bookmarklet to make session cookies expire later

Background: There are several sites that I visit regularly on my iPhone that require me to log in. Unfortunately, the sites set cookies that expire at the end of the session. This unfortunately means I end up having to log in up to a dozen times per day. I would like to write a bookmarklet that will go through and change all my 'expires...

Change CSS of selected text using Javascript

I'm trying to make a javascript bookmarklet that will act as a highlighter, changing the background of selected text on a webpage to yellow when the bookmarklet is pressed. I'm using the following code to get the selected text, and it works fine, returning the correct string function getSelText() { var SelText = ''; if (window.getSelec...

jquery forms plugin noConflict problem

Hi, I am writing a bookmarklet in which I want to use the jquery forms plugin. The problem I am having is that a web page on which the bookmarklet might be used could be using a different js lib, which already uses '$'. No problem, I can tell jQuery to use noConflict() However, the forms plugin of jQuery also uses '$' which I have no c...

Get an article's title/author/date info with Javascript

I'm trying to build a bookmarklet that will get the current page/article's author and date information, for referencing purposes. I know that I can get the Page title and url with document.title and document.URL but I'm drawing a blank when it comes to the other information. Any ideas? ...

how to fetch url containg '#' in it by php ??

Possible Duplicate: retrieve the hash in the url with php? iam having a page that is containg bookmark in its url like http://www.abc.com/page_url#bookmark iam using $_SERVER['HTTP_HOST'] and $_SERVER["REQUEST_URI"] to get the url but its gigvng URL only upto http://www.abc.com/page_url i.e. its not giving my bookmarked lin...

Load a page and apply javascript in a single bookmark

I have a bookmark that opens my a google calendar page (http://www.google.com/calendar/renderOnline) and a bookmarklet that applies some javascript on it: javascript:document.getElementById('gadgetcell').setAttribute('style','width:300px');document.getElementsByClassName('sn-frame')[0].setAttribute('style','width:300px'); Is there a wa...

Create a 'send to Delicious' bookmarklet with custom tag

Hi, I've created a javascript bookmarklet that gets the current page's title and URL, using the following code: //Check to see if jQuery is already loaded if (typeof jQuery == 'undefined') { var jQ = document.createElement('script'); jQ.type = 'text/javascript'; jQ.onload=runthis; jQ.src = 'http://ajax.googleapis.com/aja...

Method for data transfer with bookmarklet

I'm building a bookmarklet for a service. I need to transfer data (url, text) from open window but I don't know which would be the best method. GET limits the amount of data and ajax isn't possible due cross-domain problem. What would be the optimal way? ...

Javascript bookmarklet to take info from one page and submit it to form on another page

Now that I discovered here that I can't write JavaScript within one page to enter form data on another external page, I'd like to do this with a browser-based bookmarklet instead. I'm able to access the data on my original page with this bookmarklet code snippet: javascript:var%20thecode=document.myForm.myTextArea.value; If I open t...

Is it possible to surround all my javascript file with one try catch?

I wrote a bookmarklet, when the user will click on it in his browser it will do some actions on the current website and show some results in a popup. In some websites my bookmarklet fails to load because problems may exist in the current website. My bookmarklet code is using the jquery library. In some cases the errors happens in ...

help me write a bookmarklete that counts word frequency

I want to create a bookmarklete that counts up all the text on a webpage and then displays the results from most to least it in a absolutely positioned div. Every google search i've done talks about counting the total number of words in a form or text area or known div id. That's not what i want. I want the number of times each /w app...

clicking an <img> preventing the activation of the <a>

Hi all, I'm trying to implement a bookmarklet where the user will click one <img/> and will be redirected to another page where he will annotate the image. if the image is inserted within a HTML anchor: <a href="http://anywhere.org"&gt;&lt;img src=""http://anywhere.org/image.png"/&gt;&lt;/a&gt;, can I prevent the anchor to be activa...

[jQuery] $.post() as a bookmarklet XSS.

Just curious if anyone can explain to me why I can request a page from a bookmarklet like this one: javascript:var%20s=document.createElement('script');var data=encodeURI(location.href)+encodeURI('\n\n')+(encodeURI(document.getElementsByTagName('body')[0].innerHTML));s.setAttribute('src','http://example.com/remote.php?id=68&amp;act=new&...

javascript bookmarklet to hide all images from current webpage?

hey guys, i wanna create a simple bookmarklet that hides all images from the current website i'm browsing. javascript:body.getElementsByTagName("img").style.visibility="hidden"; that's not working? i wonder what i'm doing wrong? thank you for your help! ...

Is it possible for a Javascript bookmarklet to read its own name?

I would like some of my bookmarklets to adjust their behavior based on their current name. For example, I'd like to edit a bookmarklet I use, so that it would increment the last integer in the current URL by 24 if it was named "+24", or decrement it by 10 if it was named "-10". ...

How can i load a javascript file using a bookmarklet that in turn does not redirect/rewrite the page?

I'm trying to load this remote debugging solution to debug/interact with DOM/js live. The instructions ask you to put a script block and script link into the HEAD of the page to get it all working. That's fine. It's a great tool. But what if i wanted a bookmarklet-like way of just "inserting" it into any page. I don't see why this can't...

JSONP for cross-site bookmarklet guidance

I'm looking to build a cross-site bookmarklet that gets a highlighted word, passes it to a CodeIgniter method (domain.com/controller/method), and returns the definition via a dictionary API. I've got a skeleton working well on a single domain, but I'm looking to expand it to use JSONP cross-domain. But I feel unclear. I know I need to l...

Using Javascript to Open a New Page and Populate Form Values There

I am using JavaScript in a bookmarklet to populate form elements on a website: javascript:var f = document.forms[0]; f.getElementsByTagName('input')[0].value = 'myname'; f.getElementsByTagName('input')[1].value = 'mypassword'; f.getElementsByTagName('input')[2].click This works. However what I would like to create is a bookmarklet so ...

How to persist bookmarklet when loading new url?

Dear all, I'm not sure if this is possible~ Say a bookmarklet that creates an embedded iframe loaded with a web application and there's a few urls in the web application. When urls are clicked, they are loaded into the current browser window which is running the bookmarklet. By default, the bookmarklet will be "gone" after that. Is the...

adding external .js using DOM then calling function from the .js

Hey all, I'm trying to build a bookmarklette. I want to minimize the size of the javascript within the bookmarklette so that I can maintain most of the code in an external file. My goal is to... 1) Add an external .js file to the page. 2) Call a function from that external .js file. 3) Have that function add additional .js files to the ...