Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

Jesus Malverde

(10,274 posts)
Thu Aug 1, 2013, 07:45 PM Aug 2013

Bookmarklet - Search before post

Hi all,

I wrote a simple bookmarklet, it searches google for the title of the article you are currently reading and sees if it's been posted to DU.

To install this bookmarklet create a bookmark on your toolbar and use the javascript for the address.

To use this bookmarklet, when reading a news page click it in the browser toolbar.

the code is

java script:void(location.href='https://www.google.com/search?sitesearch=democraticunderground.com&q=+'+encodeURIComponent(document.title)+'')

Remove the space from the word javascript in the code

Peace

2 replies = new reply since forum marked as read
Highlight: NoneDon't highlight anything 5 newestHighlight 5 most recent replies
Bookmarklet - Search before post (Original Post) Jesus Malverde Aug 2013 OP
Nice... ChromeFoundry Aug 2013 #1
JS bookmarks can be very cool Recursion Aug 2013 #2

ChromeFoundry

(3,270 posts)
1. Nice...
Fri Aug 2, 2013, 08:57 AM
Aug 2013

This little change will bring up the search results in a new tab so you don't lose your current article...

java script:void(window.open('https://www.google.com/search?sitesearch=democraticunderground.com&q=+'+encodeURIComponent(document.title)+'','_blank'))

I had no idea that bookmarks supported JavaScript. Thanks for the tip!

Recursion

(56,582 posts)
2. JS bookmarks can be very cool
Sun Aug 4, 2013, 06:54 PM
Aug 2013

Though the document model is slightly different from normal.

Cool hack, OP!

Latest Discussions»Retired Forums»Website, DB, & Software Developers»Bookmarklet - Search befo...