Neopets - Sticky REs

Puts REs at the top of the page for a few seconds.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name           Neopets - Sticky REs
// @description    Puts REs at the top of the page for a few seconds.
// @namespace      Jawsch
// @include        http://www.neopets.com/*
// @match          http://www.neopets.com/*
// @version        1.1
// ==/UserScript==

setTimeout(function () {

	if ( window.pageYOffset > 199 ) {
		// If the normal event is already visible, don't make a copy.
		e = document.createElement('script');
		e.type = 'text/javascript';
		e.textContent = "var normalSHH = {'position': 'fixed', 'top': '10px', 'left': '50%', 'margin-left': '-200px', 'z-index': '10001', 'border-radius': '5px', 'background-color': '#fff'};"+
						"var premSHH = {'position': 'fixed', 'top': '10px', 'left': '50%', 'margin-left': '-420px', 'z-index': '10001'};"+
						"$('table[align=center][width=400]').clone().appendTo('body').css(normalSHH).fadeOut(4000, function () { $(this).remove(); } );"+
						"$('div#shh_prem_bg').clone().appendTo('body').css(premSHH).fadeOut(4000, function () { $(this).remove(); } );";
		// $('table[align=center][width=400] td[width=80] + td[width=320]').closest('table') // More specific if needed.
		document.body.appendChild(e);
	}

}, 100);