The fun part of user scripting is deciding what happens. The boring part is scavenging the DOM for bits of templated data, or elements you want to mod.
Have on.js
do it for you!
// jQuery no-double-tap-zoom plugin | |
// Triple-licensed: Public Domain, MIT and WTFPL license - share and enjoy! | |
(function($) { | |
var IS_IOS = /iphone|ipad/i.test(navigator.userAgent); | |
$.fn.nodoubletapzoom = function() { | |
if (IS_IOS) | |
$(this).bind('touchstart', function preventZoom(e) { | |
var t2 = e.timeStamp |
The fun part of user scripting is deciding what happens. The boring part is scavenging the DOM for bits of templated data, or elements you want to mod.
Have on.js
do it for you!
Hourly solar analemmas (ignoring daylight savings time) as seen from San Francisco in 2014.
Hourly solar analemmas (ignoring daylight savings time) as seen from anywhere in the world in 2014.
// makes sure fn gets called when bm_id is removed, whether it was a direct kill | |
// or it got caught in collateral damage from a recursive bookmark removal spree | |
function addBookmarkRemoveListener(bm_id, fn) { | |
// as we won't get an onRemoved callback for bm_id when any of its parents got | |
// removed recursively, keep a list of all its parents to know when to fire fn | |
function indexParentsFor(bm_id, bookmarks) { | |
function bookmarkParents(id, bms, path) { | |
////console.log('bookmarkParents(', id, bms, path, ')'); | |
for (var i = 0, bm, found; bm = bms[i]; i++) { | |
if (bm.id === id) return path; |
HAI Global (HAI) empowers individuals to be potent, loving, contributing human beings.
HAI promotes personal growth and social change by replacing ignorance , shame, and fear with awareness
var f = document.createElement("form"); | |
f.method = "POST"; | |
f.action = "/fork" + location.pathname; | |
f.appendChild(document.querySelector("input[name=authenticity_token]")); | |
f.submit(); |