This file contains 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
javascript:(function() { | |
if(!window.your_bookmarklet) { | |
var doc = document, | |
js = doc.createElement('script'); | |
js.type = 'text/javascript'; | |
js.src = 'loader.js'; | |
js.async = true; |
This file contains 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
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` |
This file contains 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
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>jQuery Mobile Original Source Bookmarklet for Chrome</title> | |
<style type="text/css" media="screen"> | |
body, html, h1 { margin: 0; padding: 0; } | |
html { padding: 20px; background: #ddd; } | |
body { max-width: 600px; margin: 0 auto; padding: 20px; box-sizing: border-box; background: #fff; font-family: Helvetica, arial; box-shadow: rgba(0,0,0,0.2) 0 0 5px } |
This file contains 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
// add layer | |
javascript:( | |
function() { | |
var div = document.createElement('div'); | |
var w = window.innerWidth; | |
var h = window.innerHeight; | |
div.setAttribute("class", "black-overlay"); | |
div.setAttribute("style", "position: fixed; top: 0px; left:0px; width: "+w+"px; height: "+h+"px; background-color: rgba(0,0,0,0.3); pointer-events: none; z-index: 4294967296"); | |
document.body.appendChild(div); | |
} |
This file contains 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
javascript: function loadScripts(array, callback) { | |
var loader = function(src, handler) { | |
var script = document.createElement("script"); | |
script.src = src; | |
script.onload = script.onreadystatechange = function() { | |
script.onreadystatechange = script.onload = null; | |
handler(); | |
}; | |
var head = document.getElementsByTagName("head")[0]; | |
(head || document.body).appendChild(script); |
This file contains 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
javascript:(function(){var script = document.createElement('script');script.type = 'text/javascript';script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.js';document.head.appendChild(script);})(); |
This file contains 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
javascript:window.location.href="https://play.spotify.com/search/"+encodeURIComponent(window.getSelection()) |
This file contains 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
// 1. Right-click on the bookmarks toolbar | |
// 2. Click Add Page... | |
// 3. Name: <enter whatever you'd like> (Mine is Genius Annotate) | |
// 4. Paste the following into the URL field (including the keyword javascript and the colon): | |
javascript: window.location.replace('http://genius.it/' + window.location.href) |
This file contains 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
function getJSON (url, callback) { | |
var xhr; | |
xhr = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState === 4) { | |
if (callback) { | |
callback(xhr.responseText); | |
} | |
} | |
}; |
OlderNewer