Skip to content

Instantly share code, notes, and snippets.

Kenneth Kufluk kennethkufluk

Block or report user

Report or block kennethkufluk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View twitter-favicon.user.js
// ==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==
@kennethkufluk
kennethkufluk / ou-frameset-quickfix.user.js
Created Feb 12, 2011
Fix for OU sites that wrongly load empty frames with src="#", breaking frameset navigation in modern browsers.
View ou-frameset-quickfix.user.js
// ==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";
}
}
@kennethkufluk
kennethkufluk / twitter-no-details.user.js
Created Mar 21, 2011
Hides the details pane from NewTwitter (Chrome)
View twitter-no-details.user.js
// ==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==
View gist:908809
(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) {
@kennethkufluk
kennethkufluk / gist:5603204
Created May 18, 2013
Example of pushState breaking Safari 6.0.4. Run this anywhere. Click the page, see the url change to "page2". Use two fingers to swipe back. Wait five seconds, and the page will fade away, because the paint server dies.
View gist:5603204
<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');
};
View gist:11223313
__defineGetter__("required", function() { throw new Error('Missing parameter'); })
function foo(mustBeProvided = required) {
return mustBeProvided;
}
> foo()
Error: Missing parameter
> foo(123)
123
You can’t perform that action at this time.