Greasy Fork

Greasy Fork is available in English.

新浪秀场清屏

进入房间时关闭特效并清屏。

当前为 2015-01-23 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        新浪秀场清屏
// @namespace   http://greasyfork.icu/scripts/4554-新浪秀场清屏
// @description 进入房间时关闭特效并清屏。
// @author      softiger
// @version     1.0
// @include     http://ok.sina.com.cn/9*
// @grant       GM_addStyle
// @require     https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js
// @history     0.1 Initial release.
// ==/UserScript==

$(document).ready( function() {
    document.getElementById("btnshowgift").click();
    document.getElementsByClassName("box_main")[0].getElementsByTagName("a")[0].click();
    /*for (var i = 1; i < 35; i++)
      clearInterval(i);*/
});

/*--- Create a button in a container div. It will be styled and
  positioned with CSS.
*/
var zNode = document.createElement('div');
zNode.innerHTML = '<button id="myButton" type="button">'
    + 'Start/Stop/Input</button>';
zNode.setAttribute('id', 'myContainer');
document.body.appendChild(zNode);

//--- Activate the newly added button.
document.getElementById("myButton").addEventListener(
    "click", ButtonClickAction, false
);

function ButtonClickAction(zEvent) {
    $("#goto_phone_link").remove();
    $("#quest_qd").remove();
    $("#quest_button").remove();
    $("#quest_box").remove();
    $("#goto_top_tag").remove();
    $("#imBox").remove();
}

//--- Style our newly added elements using CSS.
GM_addStyle( multilineStr( function() { /*!
					  #myContainer {
					  position:               absolute;
					  top:                    25em;
					  left:                   24em;
					  font-size:              20px;
					  background:             orange;
					  border:                 3px outset black;
					  margin:                 5px;
					  opacity:                0.5;
					  z-index:                9999;
					  padding:                1px 2px;
					  }
					  #myButton {
					  cursor:                 pointer;
					  }
					*/ } ) );

function multilineStr(dummyFunc) {
    var str = dummyFunc.toString();
    str = str.replace(/^[^\/]+\/\*!?/, '')  // Strip function() { /*!
	.replace(/\s*\*\/\s*\}\s*$/, '')  // Strip */ }
	.replace(/\/\/.+$/gm, '');  // Double-slash comments wreck CSS. Strip them.
    return str;
}