Skip to content

Instantly share code, notes, and snippets.

View fearphage's full-sized avatar
⌨️
Cache rules everything around me.

Phred Lane fearphage

⌨️
Cache rules everything around me.
View GitHub Profile
// ==UserScript==
// @name lighthouse: Edit your comments
// @description Adds ability to edit your own ticket comments.
// @include https://*.lighthouseapp.com/projects/*/tickets/*
//
// Mouseover the comment and an edit button will appear to the
// top-right of the comment.
// ==/UserScript==
(function(global, form) {
// ==UserScript==
// @name Helvetireader
// @description Helvetireader style for Google Reader
// @include http*://*.google.*/reader/view*
// @author Helvetireader by Jon Hicks (http://www.hicksdesign.co.uk) with favicon override by MkFly
// ==/UserScript==
(function(doc) {
var head = doc.getElementsByTagName('head')[0]
,favvy = head.appendChild(doc.createElement('link'))
(function () {
function detectMutation() {
mutationSupported = true;
this.removeEventListener('DOMAttrModified', detectMutation, false);
}
var forEach = [].forEach,
regex = /^data-(.+)/,
el = document.createElement('div'),
mutationSupported = false,
@fearphage
fearphage / bind-perf.htm
Created February 21, 2010 14:25
Function.prototype.bind benchmarks
<!DOCTYPE html>
<html>
<head>
<title>binding benchmarks</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js"></script>
<script type="text/javascript">
Function.prototype.bind_old = function() {
if (arguments.length < 2 && Object.isUndefined(arguments[0])) { return this; }
var __method = this, args = $A(arguments), object = args.shift();
return function () {
(function(window, document, undefined) {
// Enable all HTML5 elements in IE. For discussion and comments, see: http://remysharp.com/2009/01/07/html5-enabling-script/
/*@cc_on'abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video'.replace(/\w+/g,function(n){document.createElement(n)})@*/
var each = [].forEach || function (fn) {
var len = this.length || 0, that = arguments[1];
if (typeof fn == 'function') {
for (var i = 0; i < len; i++) {
fn.call(that, this[i], i, this);
// detect support for css3 border radius
var BORDER_RADIUS_SUPPORT = (function(document) {
var docEl = document.documentElement, s = docEl && docEl.style;
return (s
? typeof s.borderRadius == 'string'
|| typeof s.KhtmlBorderRadius == 'string'
|| typeof s.MozBorderRadius == 'string'
|| typeof s.WebkitBorderRadius == 'string'
: null
ARRAY_PROTOTYPE_SLICE_CAN_CONVERT_NODELIST_TO_ARRAY = (function (){
try {
return (Array.prototype.slice.call(document.forms, 0) instanceof Array);
}
catch(e) {
return false;
}
})();
// ==UserScript==
// @name Reddit Keyboard Navigation
// @namespace http://andrewdupont.net/greasemonkey
// @description Navigate Reddit comments. Expand, collapse, and reply
// without having to pinpoint tiny links with your mouse.
// @author Andrew Dupont
// @include http://reddit.com/*
// @include https://reddit.com/*
// @include http://*.reddit.com/*
// @include https://*.reddit.com/*
// this is how I fixed IE crashing on
// dynamic injections of AtRules inside
// stylesheets (for example @font-face)
function setStyle(rules) {
var d = document,
s = d.createElement('style'),
h = d.getElementsByTagName('head')[0] || d.documentElement;
s.type = 'text/css';
d.createElement('div').appendChild(s).styleSheet.cssText = rules;
.mouse{
position: absolute;
background-image: url('../images/cursor.png');
width: 15px;
height: 22px;
z-index: 100;
}