Created
October 31, 2011 18:20
-
-
Save pascaldevink/1328320 to your computer and use it in GitHub Desktop.
Tweakers old carrousel
This file contains hidden or 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 Tweakers.net old carrousel | |
// @namespace http://tweakers.net | |
// @include http://tweakers.net/ | |
// @include http://www.tweakers.net/ | |
// ==/UserScript== | |
var $; | |
(function(){ | |
if (typeof unsafeWindow.jQuery == 'undefined') { | |
var GM_Head = document.getElementsByTagName('head')[0] || document.documentElement, | |
GM_JQ = document.createElement('script'); | |
GM_JQ.src = 'http://code.jquery.com/jquery-1.6.4.min.js'; | |
GM_JQ.type = 'text/javascript'; | |
GM_JQ.async = true; | |
GM_Head.insertBefore(GM_JQ, GM_Head.firstChild); | |
} | |
replaceCarrousel(); | |
})(); | |
function replaceCarrousel() | |
{ | |
if (typeof unsafeWindow.jQuery == 'undefined') { | |
window.setTimeout(replaceCarrousel, 100); | |
} else { | |
$ = unsafeWindow.jQuery.noConflict(true); | |
$('.tabItemFrontpageSmall').each(function(index) { | |
var link = $(this).find('.announcementSmallContent').find('a'); | |
$(link).css('color', '#000'); | |
$(link).css('font-size', '11px'); | |
$(link).css('font-weight', 'normal'); | |
$(this).css('height', '16px'); | |
$(this).empty().append(link); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment