Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed not working google results bookmarklets and added one for goo…

…gle cache and one for rich snippet testing
  • Loading branch information...
commit ffce40bf623c634364fad93e025b369955d66b08 1 parent a068cee
@yaph authored
View
8 README.md
@@ -10,11 +10,11 @@ To add one of the bookmarklets to your browser, create a new bookmark (CTRL+D) a
### go2urlwithoutsearch.js
javascript:(function(){document.location.href=document.location.href.replace(document.location.search,"")}());
-### google_search_results_as_list.src.js
- javascript:(function(){var b={run:function(){var c=document.createElement("ol");var d=document.getElementById("center_col");jQuery(d).find("ol li.g a.l").each(function(f,e){c.appendChild(b.getLi(e))});d.innerHTML="";d.appendChild(c);b.style()},getLi:function(f){var c=document.createElement("li");var d=document.createElement("a");d.innerHTML=d.href=f.href;c.appendChild(d);return c},style:function(){var c=document.createElement("style");c.type="text/css";c.innerHTML="ol li{list-style-type:decimal;margin:5px 0 5px 30px;}";document.getElementsByTagName("head")[0].appendChild(c)}};if("undefined"==typeof jQuery){var a=document.createElement("script");a.type="text/javascript";a.onload=b.run;a.src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";document.body.appendChild(a)}else{b.run()}}());
+### google_cache.js
+ javascript:location.href="http://www.google.com/search?q=cache:"+encodeURIComponent(location.href);
-### google_search_results_as_csv.src.js
- javascript:(function(){var b={re_escape_csv:new RegExp("[\\\"']","g"),run:function(){var c="";jQuery("ol li.g a.l").each(function(e,d){c+=b.csvField(d.href)+","+b.csvField(d.innerHTML)+"\n"});window.location="data:text/csv;charset=utf8,"+encodeURIComponent(c);return true},csvField:function(c){return'"'+(c+"").replace(b.re_escape_csv,"\\$&").replace(/\u0000/g,"\\0")+'"'}};if("undefined"==typeof jQuery){var a=document.createElement("script");a.type="text/javascript";a.onload=b.run;a.src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";document.body.appendChild(a)}else{b.run()}}());
+### rich_snippets_test.js
+ javascript:void (window.open("http://www.google.com/webmasters/tools/richsnippets?url="+encodeURIComponent(window.location.href),"_blank"));
### export2list.js
var list="";$("dl dt").each(function(b,d){var c=$(d).find("a");list+='<li><a href="'+c.attr("href")+'">'+c.text()+"</a></li>\n"});console.log("<ul>"+list+"</ul>");
View
1  google/google_cache.js
@@ -0,0 +1 @@
+javascript:location.href='http://www.google.com/search?q=cache:'+encodeURIComponent(location.href)
View
30 google/google_search_results_as_csv.src.js
@@ -1,30 +0,0 @@
-javascript:(function(){
-/**
- * Browser bookmarklet to display Google search results as CSV.
- * @author Ramiro Gómez http://www.ramiro.org/
- * @see http://stackoverflow.com/questions/921037/jquery-table-to-csv-export
- */
-var BM = {
- 're_escape_csv': new RegExp('[\\"\']', 'g'),
- 'run': function() {
- var csv = '';
- jQuery('ol li.g a.l').each(function(i,v){
- csv += BM.csvField(v.href)+','+BM.csvField(v.innerHTML)+"\n";
- });
- window.location='data:text/csv;charset=utf8,' + encodeURIComponent(csv);
- return true;
- },
- 'csvField': function(str) {
- return '"'+(str+'').replace(BM.re_escape_csv, '\\$&').replace(/\u0000/g, '\\0')+'"';
- }
-};
-if ('undefined'==typeof jQuery) {
- var jQ = document.createElement('script');
- jQ.type = 'text/javascript';
- jQ.onload=BM.run;
- jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
- document.body.appendChild(jQ);
-} else {
- BM.run();
-}
-}());
View
40 google/google_search_results_as_list.src.js
@@ -1,40 +0,0 @@
-javascript:(function(){
-/**
- * Browser bookmarklet to display Google search results as ordered list of URLs.
- * @author Ramiro Gómez http://www.ramiro.org/
- */
-var BM = {
- 'run': function() {
- var ol = document.createElement('ol');
- var res = document.getElementById('center_col');
- jQuery(res).find('ol li.g a.l').each(function(i,v){
- ol.appendChild(BM.getLi(v));
- });
- res.innerHTML='';
- res.appendChild(ol);
- BM.style();
- },
- 'getLi': function(e) {
- var li = document.createElement('li');
- var a = document.createElement('a');
- a.innerHTML = a.href = e.href;
- li.appendChild(a);
- return li;
- },
- 'style': function() {
- var s = document.createElement('style');
- s.type = 'text/css';
- s.innerHTML = 'ol li{list-style-type:decimal;margin:5px 0 5px 30px;}';
- document.getElementsByTagName('head')[0].appendChild(s);
- }
-};
-if ('undefined'==typeof jQuery) {
- var jQ = document.createElement('script');
- jQ.type = 'text/javascript';
- jQ.onload=BM.run;
- jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
- document.body.appendChild(jQ);
-} else {
- BM.run();
-}
-}());
View
1  google/rich_snippets_test.js
@@ -0,0 +1 @@
+javascript:void(window.open('http://www.google.com/webmasters/tools/richsnippets?url='+encodeURIComponent(window.location.href),'_blank'));
Please sign in to comment.
Something went wrong with that request. Please try again.