Skip to content

Instantly share code, notes, and snippets.

@tallykatt
tallykatt / bookmarklet.js
Created July 24, 2016 23:35 — forked from chetan/bookmarklet.js
youtube unblocker bookmarklet
javascript:(function(){var%20s=document.createElement('script');s.setAttribute('src','https://code.jquery.com/jquery-2.1.1.min.js');s.setAttribute('type','text/javascript');document.getElementsByTagName('head')[0].appendChild(s);$jq=jQuery.noConflict();$jq("a").each(function(i,el){var%20href=$jq(el).attr("href");var%20matches=href?href.match(/youtube.com\/watch\?.*?v=([a-zA-Z0-9_\-]+)/):null;if(matches){$jq(el).attr("href","https://www.youtube-nocookie.com/embed/"+matches[1]);}});$jq("iframe").each(function(i,el){var%20src=$jq(el).attr("src");var%20matches=src?src.match(/youtube.com\/embed\/([a-zA-Z0-9_\-]+)\??/):null;if(matches){$jq(el).attr("src","https://www.youtube-nocookie.com/embed/"+matches[1]);}});})();
@tallykatt
tallykatt / load-external-script-snippet.js
Created July 24, 2016 23:35 — forked from cou929/load-external-script-snippet.js
Simple code snippet for loading external script from a bookmarklet.
/**
* load-external-script-snippet.js
* Kosei Moriyama <[email protected]>
*
* Simple code snippet for loading external script from a bookmarklet.
* Replace example url of script to your target script url before use.
*/
(function() {
var u = 'http://example.com/bookmarklet.js';
@tallykatt
tallykatt / Revealer.js
Created July 24, 2016 23:35 — forked from clamytoe/Revealer.js
Bookmarklet code to reveal passwords on a web page.
javascript:void((function()%7Bvar%20a,b;b=%22%3C%22+%22html%3E%5Cn%3Cbody%3EPasswords%20in%20this%20page:%3Cp%3E%5Cn%22;(function(c)%7Bvar%20d,e,f,g,h;for(d=0;d%3Cc.length;d++)%7Btry%7Barguments.callee(c.frames[d]);%7Dcatch(i)%7B%7D%7De=c.document.forms;for(f=0;f%3Ce.length;f++)%7Bg=e[f];for(h=0;h%3Cg.length;h++)%7Bif(g[h].type.toLowerCase()==%22password%22)b+=g[h].value+%22%3Cbr%3E%5Cn%22;%7D%7D%7D)(top);b+=%22%3C/body%3E%5Cn%3C/html%3E%5Cn%22;a=window.open(%22%22,%22%22,%22width=200,height=300%22).document;a.open();a.write(b);a.close();%7D)())
@tallykatt
tallykatt / popup.js
Created July 24, 2016 23:36 — forked from epatr/popup.js
Bookmarklet to pop up websites in window without browser toolbars
javascript:window.open('http://','windowName','width=960,height=720,scrollbars=yes,status=no,titlebar=no,toolbar=no');void(0);
@tallykatt
tallykatt / notepad.html
Created July 24, 2016 23:36 — forked from ryuzheng/notepad.html
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@tallykatt
tallykatt / nocss.js
Created July 24, 2016 23:36 — forked from l3dlp/nocss.js
NoCSS Bookmarklet - Make any page readable; Usage: paste the code into a bookmark URL
javascript:(function(){for(i=0;i<document.styleSheets.length;i++){document.styleSheets.item(i).disabled=true;}all=document.getElementsByTagName('*');for(i=0;i<all.length;i++){var s=all[i].style;s.cssText='';s.width='';s.padding='1px';s.margin='1px';s.fontSize='12pt';s.lineHeight='150%';if(s.position=='absolute'||s.position=='relative'||s.position=='fixed')s.position='static';}var st=document.body.style;st.paddingLeft='100px';st.paddingRight='100px';st.backgroundImage='none';st.backgroundColor='#fff';st.color='#000';})();
@tallykatt
tallykatt / bookmarklet_select_all.js
Created July 24, 2016 23:37 — forked from willurd/bookmarklet_select_all.js
Select All: A bookmarklet for those annoying sites that block you from selecting stuff
javascript:(function()%7Bvar style%3Ddocument.createElement("style")%3Bstyle.type%3D"text/css"%3Bstyle.innerText%3D"* %7B -webkit-user-select: all !important%3B -moz-user-select: all !important%3B user-select: all !important%3B %7D"%3Bvar head%3Ddocument.getElementsByTagName("head")%5B0%5D%3Bhead.appendChild(style)%3B%7D)()%3B
@tallykatt
tallykatt / pop-out.js
Created July 24, 2016 23:37 — forked from fregante/pop-out.js
Bookmarklet: Pop out the current window in a small, "mobile" window
javascript:window.open(document.location.href,''+Math.random(),'width=320,height=480,top='+(screen.height/2-480/2+Math.random()*100-50)+', left='+(screen.width/2-320/2+Math.random()*100-50))
@tallykatt
tallykatt / utils.js
Created July 24, 2016 23:56 — forked from hagb4rd/utils.js
Chrome Dev Tools
var UTILS = {
// ------------------------------------------------------------------
// Object Helpers
// ------------------------------------------------------------------
GUID: function () {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
@tallykatt
tallykatt / debug.js
Created July 25, 2016 01:16 — forked from dftaiwo/debug.js
JS Console Logging For Production & Debug Builds
var debugMode=false;
//.....
function logMessage() {
if(!debugMode) return;
console.log(Array.prototype.slice.call(arguments) );
}