您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A small script to simplify the shoutbox
当前为
- // ==UserScript==
- // @name TorViet Shoutbox Enhancer
- // @namespace http://torviet.com/userdetails.php?id=1662
- // @version 0.3.1
- // @license http://www.wtfpl.net/txt/copying/
- // @icon http://torviet.com/pic/salad.png
- // @description A small script to simplify the shoutbox
- // @author Salad
- // @match http://torviet.com/qa.php*
- // @grant none
- // ==/UserScript==
- $(function(){
- // Remove unneeded stuffs
- $('#boxHead').remove();
- $('.marquee').remove();
- $('#sltTheme').remove();
- $('#clock').remove();
- // Alter existing element CSS
- $('.all-wrapper').css({
- 'background-image': 'none',
- 'margin': 'auto',
- 'height': $(window).height()
- });
- $('.input-section').parent().css('padding', '0px');
- $('.navigation_page').css('width', 'auto');
- $('#boxQuestion').css('height', $(window).height() - getRemainingHeight() - 20);
- $('#emo-section').css('height', $(window).height() - getRemainingHeight() - 22);
- // Alter existing element attributes
- $('#emogroup option:contains("Voz")').prop('selected', true);
- // Add elements
- var myScript = document.createElement('script');
- myScript.type = 'text/javascript';
- myScript.innerHTML = 'function toggleEmoSlt() {' +
- '$(".emo-group-title-wrapper").slideToggle();' +
- '}';
- $('.input-section-a').append(myScript);
- $('.input-section-a').append('<input type="button" value="Toggle" onclick="toggleEmoSlt()" />');
- // Functions
- toggleEmoSlt();
- $('#emogroup').change();
- $('#idQuestion').focus();
- function getRemainingHeight() {
- return $('.input-section').parent().height() + $('.navigation_page').height();
- }
- });