javascript - Bookmark that takes the displaying URL and adds additional string -


this need accomplish. go example.com on chrome browser. have bookmark on browser, on when click automatically takes example.com url , adds string, example cache: , when click bookmark take me cache:example.com when go example2.com , click on bookmark again, take me cache:example2.com there javascript code or else can make possible?

just add javascript change window.location.href attribute.

the following help

javascript:(     function(){         f='cache:'+window.location.href;         if(!window.open(f))             location.href=f;     } )() 

you can change , set href whatever want

you have add javascript anchor tag when link dragged , dropped in browser's bookmarklet bar, added. link this:

<a title="gotocache" href="javascript:(function(){f='cache:'+window.location.href;if(!window.open(f))location.href=f;})()">goto cache</a> 

add link in page , set :)


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -