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 d = document; | |
var wrap = d.createElement('span'); | |
wrap.style.position = 'relative'; | |
wrap.className = 'wrap'; | |
var cmt = d.createElement('textarea'); | |
cmt.style.backgroundColor = 'yellow'; | |
cmt.style.top = '1.5em'; | |
cmt.style.position = 'absolute'; | |
cmt.style.zIndex = '99'; |
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 els, i, txt = ""; | |
if (window.getSelection) { | |
txt = window.getSelection(); | |
} else if (document.getSelection) { | |
txt = document.getSelection(); | |
} else if (document.selection) { | |
txt = document.selection.createRange().text; | |
} else { | |
txt = ""; |
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 d=document,useMine=true,prevEl; | |
function AddHandler(orig,mine) { | |
return function(e){ | |
if(useMine) | |
mine(e); | |
else | |
if(orig) | |
orig(e); |
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 d=document,useMine=true,prevEl,info; | |
function addHandler(orig,mine){ | |
return function(e){ | |
if(useMine){ | |
mine(e); | |
} | |
else | |
if(orig){ |
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 name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<title>Google Maps JavaScript API v3 Example: Overlay Simple</title> | |
<link href="https://developers.google.com/maps/documentation/javascript/examples/default.css" | |
rel="stylesheet"> | |
<style> |
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 tidySpaces() { | |
var olCode, spans, i, span_textnode, span_text, span_next, offLeft, newLeft; | |
if (document.getElementsByClassName) { | |
spans = document.getElementsByClassName('tidy'); | |
if (spans != 'undefined' && spans.length) { | |
for ( i = 0; i < spans.length; i++ ) | |
spans[i].style.paddingLeft = (spans[i].style.paddingLeft == '0px') ? | |
spans[i].prevValue : '0px'; | |
return; | |
} |
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
import sublime, sublime_plugin | |
py_funcs = [ | |
("abs()\tabs fn", "abs(${1:number})$0"), | |
("all()\tall fn", "all(${1:iterable})$0"), | |
("any()\tany fn", "any(${1:iterable})$0"), | |
("bin()\tbin fn", "bin(${1:integer})$0"), | |
("bool()\tbool fn", "bool(${1:[value]})$0"), | |
("bytearray()\tbytearray fn", | |
"bytearray(${1:${2:source}${3:[, encoding]}${4:[, errors]}})$0"), |
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
import sublime, sublime_plugin | |
py_funcs = [ | |
("abs()\tabs fn", "abs(${1:number})$0"), | |
("all()\tall fn", "all(${1:iterable})$0"), | |
("any()\tany fn", "any(${1:iterable})$0"), | |
("bin()\tbin fn", "bin(${1:integer})$0"), | |
("bool()\tbool fn", "bool(${1:[value]})$0"), | |
("bytearray()\tbytearray fn", | |
"bytearray(${1:${2:source}${3:[, encoding]}${4:[, errors]}})$0"), |
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
import sublime, sublime_plugin | |
import re | |
py_compl = [ # standard Python functions | |
("abs()\tabs fn", "abs(${1:number})$0"), | |
("all()\tall fn", "all(${1:iterable})$0"), | |
("any()\tany fn", "any(${1:iterable})$0"), | |
("bin()\tbin fn", "bin(${1:integer})$0"), | |
("bool()\tbool fn", "bool(${1:[value]})$0"), | |
("bytearray()\tbytearray fn", |
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
import sublime, sublime_plugin | |
import re | |
py_compl = [ | |
("abs\tabs fn", "abs(${1:number})$0"), | |
("all\tall fn", "all(${1:iterable})$0"), | |
("any\tany fn", "any(${1:iterable})$0"), | |
("basestring\tbasestring type", "basestring$0"), | |
("bin\tbin fn", "bin(${1:integer})$0"), | |
("bool\tbool fn", "bool(${1:[value]})$0"), |
NewerOlder