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 - Remove Promoted Tweets | |
// @description Remove promoted tweets from Twitter | |
// @author Nick Stakenburg | |
// @namespace https://gist.githubusercontent.com/staaky | |
// @license MIT; https://opensource.org/licenses/MIT | |
// @updateURL https://gist.githubusercontent.com/staaky/743103cc6e0e6a4bff6d2fca73e95d1e/raw/twitter-remove-promoted-tweets.user.js | |
// @downloadURL https://gist.githubusercontent.com/staaky/743103cc6e0e6a4bff6d2fca73e95d1e/raw/twitter-remove-promoted-tweets.user.js | |
// @include http://twitter.com/* | |
// @include https://twitter.com/* |
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
/*! | |
* Disable Fresco on Mobile Browsers | |
* http://www.frescojs.com | |
*/ | |
(function($) { | |
var SUPPORTS_TOUCH = (function() { | |
try { | |
return !!(('ontouchstart' in window) || | |
window.DocumentTouch && document instanceof DocumentTouch); | |
} catch (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
/* A quick parent/child helper idea for tipped.js | |
* blocks parent tooltips from hiding when child tooltips are open | |
* http://groups.google.com/group/tippedjs/browse_thread/thread/29a65b3a4c0a37df | |
*/ | |
(function($) { | |
window.TippedParentChildHelper = { | |
showChild: function(content, element) { | |
var parent = element.getAttribute('data-tipped-parent'); |
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
getHiddenDimensions: function(element) { | |
element = $(element); | |
var check = element.ancestors(), | |
restore = [], | |
styles = []; | |
check.push(element); | |
// All *Width and *Height properties give 0 on elements with display none, | |
// or when ancestors have display none, so enable those temporarily | |
check.each(function(c) { |
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
var Feature = (function() { | |
var tests = { | |
DOCUMENT_GETELEMENTBYID_CONFUSES_IDS_WITH_NAMES: function() { | |
// need to feature test all these DOM methods before calling them | |
var num = Number(new Date()), | |
name = '__test_' + num, | |
head = document.getElementsByTagName('head')[0], | |
isBuggy = false, | |
el; | |
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
Element.addMethods({ | |
setPngBackground: (function() { | |
var IEBelow7 = (function(agent) { | |
var version = new RegExp('MSIE ([\\d.]+)').exec(agent); | |
return version ? parseFloat(version[1]) < 7 : false; | |
})(navigator.userAgent); | |
return function(element, url) { | |
element = $(element); | |
var options = Object.extend({ |