This repository was archived by the owner on Mar 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbookmarklet.js
More file actions
1 lines (1 loc) · 1.47 KB
/
Copy pathbookmarklet.js
File metadata and controls
1 lines (1 loc) · 1.47 KB
1
javascript:void%20(jqueryload());function%20jqueryload(){var%20a=document.createElement("script");a.src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js";document.getElementsByTagName("head")[0].appendChild(a);window.setTimeout("fontstacktester()",1000)}function%20fontstacktester(){var%20b=new%20Array();var%20a=$("body%20*").each(function(c){fontstack=$(this).css("font-family").split(",");fontstack=jQuery.map(fontstack,function(d){return%20d.replace(new%20RegExp("w+","g"),"")});jQuery.each(fontstack,function(e,d){d=checkFont(d);if(jQuery.inArray(d,b)==-1){b.push(d)}})});gui=$("body").prepend('<div%20id="fontstacker_gui"%20style="position:%20relative;%20top:%200;%20left:%200;%20background-color:%20#ccc;%20display:%20block;%20padding:%2010px;%20width:%2095%;">Font%20Stack%20Tester:%20</div>');jQuery.each(b,function(d,c){vf=filterFont(c);$("#fontstacker_gui").append('<button%20id="fontstacker_toggle_'+vf+'">Remove%20'+c+"</button>");$("#fontstacker_toggle_"+vf).click(function(){fontstacker_remove_font(c)})})}function%20filterFont(c){var%20b=/"/g;var%20a=/\s/g;c=c.replace(b,"");c=c.replace(/\s/g,"_");return%20c}function%20checkFont(b){var%20a=/"/g;check=b.match(a);leer=b.match(/\s/);if(!check&&leer){return'"'+b+'"'}else{return%20b}}function%20fontstacker_remove_font(a){var%20b=$("body%20*").each(function(d,c){fontstack=$(c).css("font-family").replace(a,"zzz");$(c).css("font-family",fontstack)});fon=filterFont(a);$("#fontstacker_toggle_"+fon).attr("disabled","disabled")};