新浪秀场清屏

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

目前为 2015-02-05 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 新浪秀场清屏
  3. // @namespace https://gf.qytechs.cn/scripts/4554-新浪秀场清屏
  4. // @description 进入房间时关闭特效并清屏。
  5. // @author softiger
  6. // @version 1.0
  7. // @include http://ok.sina.com.cn/9*
  8. // @grant GM_addStyle
  9. // @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js
  10. // @history 1.0 Initial release.
  11. // ==/UserScript==
  12.  
  13. $(document).ready( function() {
  14. document.getElementById("btnshowgift").click();
  15. document.getElementsByClassName("box_main")[0].getElementsByTagName("a")[0].click();
  16. /*for (var i=1; i<35; i++)
  17. clearInterval(i);*/
  18. });
  19.  
  20. /*--- Create a button in a container div. It will be styled and
  21. positioned with CSS.
  22. */
  23. var zNode = document.createElement("div");
  24. zNode.innerHTML = '<button id="myButton" type="button">'
  25. + 'Clear</button>';
  26. zNode.setAttribute("id", "myContainer");
  27. document.body.appendChild(zNode);
  28.  
  29. //--- Activate the newly added button.
  30. document.getElementById("myButton").addEventListener(
  31. "click", ButtonClickAction, false
  32. );
  33.  
  34. function ButtonClickAction(zEvent) {
  35. $("#goto_phone_link").remove();
  36. $("#quest_qd").remove();
  37. $("#quest_button").remove();
  38. $("#quest_box").remove();
  39. $("#goto_top_tag").remove();
  40. $("#imBox").remove();
  41. }
  42.  
  43. //--- Style our newly added elements using CSS.
  44. GM_addStyle( multilineStr( function() { /*!
  45. #myContainer {
  46. position: absolute;
  47. top: 25em;
  48. left: 24em;
  49. font-size: 20px;
  50. background: orange;
  51. border: 3px outset black;
  52. margin: 5px;
  53. opacity: 0.5;
  54. z-index: 9999;
  55. padding: 1px 2px;
  56. }
  57. #myButton {
  58. cursor: pointer;
  59. }
  60. */ } ) );
  61.  
  62. function multilineStr(dummyFunc) {
  63. var str = dummyFunc.toString();
  64. str = str.replace(/^[^\/]+\/\*!?/, "") // Strip function() { /*!
  65. .replace(/\s*\*\/\s*\}\s*$/, "") // Strip */ }
  66. .replace(/\/\/.+$/gm, ""); // Double-slash comments wreck CSS. Strip them.
  67. return str;
  68. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址