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
__defineGetter__("required", function() { throw new Error('Missing parameter'); }) | |
function foo(mustBeProvided = required) { | |
return mustBeProvided; | |
} | |
> foo() | |
Error: Missing parameter | |
> foo(123) | |
123 |
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
<html> | |
<title>Bug in Safari 6.0.4</title> | |
<body> | |
Run this anywhere. Click the page, see the url change to "page2".<br/> | |
Use two fingers to swipe back. Wait five seconds, and the page will fade away, because the painter dies.<br/> | |
Does not fail if web inspector is open. | |
<script> | |
document.body.onclick = function() { | |
history.pushState({}, 'title', 'page2'); | |
}; |
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() { | |
if (window.__twitterIntentHandler) return; | |
var intentRegex = /twitter\.com(\:\d{2,4})?\/intent\/(\w+)/, | |
windowOptions = 'scrollbars=yes,resizable=yes,toolbar=no,location=yes', | |
width = 550, | |
height = 420, | |
winHeight = screen.height, | |
winWidth = screen.width; | |
function handleIntent(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
// ==UserScript== | |
// @name Twitter No Details | |
// @description Removes the details pane from NewTwitter | |
// @version 1.0 | |
// @author KennethKufluk | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js | |
// @include http://twitter.com/* | |
// @include https://twitter.com/* | |
// ==/UserScript== |
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
// ==UserScript== | |
// @match http://students.open.ac.uk/* | |
// ==/UserScript== | |
if (top==window) { | |
var myframes = document.getElementsByTagName('frame'); | |
for (var frame in myframes) { | |
if (!myframes.hasOwnProperty(frame) || typeof myframes[frame] == 'undefined' ) continue; | |
if (myframes[frame].src.match(/\/#$/)) myframes[frame].src="about:blank"; | |
} | |
} |
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
// ==UserScript== | |
// @name Twitter Dynamic Icon | |
// @description Changes the number on the Twitter favicon to reflect the current date, as per http://remysharp.com/2010/08/24/dynamic-favicons and http://userscripts.org/scripts/show/84382 | |
// @version 1.0 | |
// @author KennethKufluk | |
// @namespace ttp://kenneth.kufluk.com/blog/2010/11/dynamic-twitter-icon-with-greasemonkey-script-in-chrome/ | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js | |
// @include http://twitter.com/* | |
// @include https://twitter.com/* | |
// ==/UserScript== |