spoiler tmd

postul #0 in spoiler

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name       spoiler tmd
// @description  postul #0 in spoiler
// @version    0.3
// @description  enter something useful
// @include     *torrentsmd.com/forum.php*
// @include     *torrentsmd.*/forum.php*
// @include     *torrentsmoldova.*/forum.php*
// @copyright   2012+, XXN
// @icon         http://s017.radikal.ru/i432/1308/7b/34fa18a96812.png
// @namespace https://greasyfork.org/users/213
// ==/UserScript==

if (cc = document.getElementById('forumPosts_first').getElementsByClassName('comment')[0])
    { cc.innerHTML= 
      '<div id="my_click"  style="font-weight: bold;">[Spoiler]</div>'
    + '<div id="my_spoiler" style="display: none;">' +cc.innerHTML +'</div>'       
   
    document.getElementById('my_click').onclick = function (e)
    {    el=document.getElementById('my_spoiler');           
      if ( el.style.display=='none') {el.style.display= ''    }
      else                          {el.style.display= 'none'}
    }
    $j('div.sp-head').toggleClass('jsClickEvAttached',false); $j('div.sp-head').unbind()
    $j('div.sp-foot').toggleClass('jsClickEvAttached',false); $j('div.sp-foot').unbind()
    initSpoilers()
    }