Created
June 30, 2014 15:56
-
-
Save esaborit4code/2e95b34b4ce2c09d3edd to your computer and use it in GitHub Desktop.
JS bookmarks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQueryfy: loads jQuery in pages that don't have it | |
javascript: (function()%7Bvar el%3Ddocument.createElement(%27div%27),b%3Ddocument.getElementsByTagName(%27body%27)%5B0%5D%3Botherlib%3Dfalse,msg%3D%27%27%3Bel.style.position%3D%27fixed%27%3Bel.style.height%3D%2732px%27%3Bel.style.width%3D%27220px%27%3Bel.style.marginLeft%3D%27-110px%27%3Bel.style.top%3D%270%27%3Bel.style.left%3D%2750%25%27%3Bel.style.padding%3D%275px 10px%27%3Bel.style.zIndex%3D1001%3Bel.style.fontSize%3D%2712px%27%3Bel.style.color%3D%27%23222%27%3Bel.style.backgroundColor%3D%27%23f99%27%3Bif(typeof jQuery!%3D%27undefined%27)%7Bmsg%3D%27This page already using jQuery v%27%2BjQuery.fn.jquery%3Breturn showMsg()%3B%7Delse if(typeof %24%3D%3D%27function%27)%7Botherlib%3Dtrue%3B%7D function getScript(url,success)%7Bvar script%3Ddocument.createElement(%27script%27)%3Bscript.src%3Durl%3Bvar head%3Ddocument.getElementsByTagName(%27head%27)%5B0%5D,done%3Dfalse%3Bscript.onload%3Dscript.onreadystatechange%3Dfunction()%7Bif(!done%26%26(!this.readyState%7C%7Cthis.readyState%3D%3D%27loaded%27%7C%7Cthis.readyState%3D%3D%27complete%27))%7Bdone%3Dtrue%3Bsuccess()%3Bscript.onload%3Dscript.onreadystatechange%3Dnull%3Bhead.removeChild(script)%3B%7D%7D%3Bhead.appendChild(script)%3B%7D getScript(%27http://code.jquery.com/jquery-latest.min.js%27,function()%7Bif(typeof jQuery%3D%3D%27undefined%27)%7Bmsg%3D%27Sorry, but jQuery wasn%5C%27t able to load%27%3B%7Delse%7Bmsg%3D%27This page is now jQuerified with v%27%2BjQuery.fn.jquery%3Bif(otherlib)%7Bmsg%2B%3D%27 and noConflict(). Use %24jq(), not %24().%27%3B%7D%7D return showMsg()%3B%7D)%3Bfunction showMsg()%7Bel.innerHTML%3Dmsg%3Bb.appendChild(el)%3Bwindow.setTimeout(function()%7Bif(typeof jQuery%3D%3D%27undefined%27)%7Bb.removeChild(el)%3B%7Delse%7BjQuery(el).fadeOut(%27slow%27,function()%7BjQuery(this).remove()%3B%7D)%3Bif(otherlib)%7B%24jq%3DjQuery.noConflict()%3B%7D%7D%7D,2500)%3B%7D%7D)()%3B | |
Print Firendly: tries to remove the clutter to print articles | |
javascript:(function()%7Bif(window%5B%27priFri%27%5D)%7Bwindow.print()%7Delse%7Bvar pfurl%3D%27%27%3Bpfstyle%3D%27nbk%27%3BpfBkVersion%3D%271%27%3Bif(window.location.href.match(/https/))%7Bpfurl%3D%27https://pf-cdn.printfriendly.com/ssl/main.js%27%7Delse%7Bpfurl%3D%27http://cdn.printfriendly.com/printfriendly.js%27%7D_pnicer_script%3Ddocument.createElement(%27SCRIPT%27)%3B_pnicer_script.type%3D%27text/javascript%27%3B_pnicer_script.src%3Dpfurl %2B %27%3Fx%3D%27%2B(Math.random())%3Bdocument.getElementsByTagName(%27head%27)%5B0%5D.appendChild(_pnicer_script)%3B%7D%7D)()%3B | |
Show outated diffs: unfolds the outdated diffs in Github | |
javascript:$('.discussion-item-toggle-closed.js-details-target').click(); | |
Hide inline comments: hides the comments on lines in Github | |
javascript:$('.js-show-inline-comments-toggle').click(); | |
CodeClimate scroll: fixes the scroll issue in CodeClimate | |
javascript:$('.box.code_container').css('overflow', 'auto') | |
localhostiza: moves you to localhost with the current path you are visiting | |
javascript:v=location.href;x=v.replace('www.rankia.com','localhost:3001').replace('www.verema.com','localhost:3002');location.href=x; | |
produccioniza: moves you to production with the current path you are visiting | |
javascript:v=location.href;x=v.replace('localhost:3001','www.rankia.com').replace('localhost:3002','www.verema.com');location.href=x; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment