// ==UserScript== // @name 北邮人BT趣味盒高度调整 // @namespace http://tampermonkey.net/ // @description 北邮人BT首页趣味盒高度调整 // @version 1.12 // @author wangcr // @match https://bt.byr.cn/index.php // @match https://bt.byr.cn/ // @match https://byr.pt/index.php // @match https://byr.pt/ // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; window.changeFunboxHeight = function(){ $("iframe[src='fun.php?action=view']").attr("height", $("#funbox_height").attr("value")); localStorage.funbox_height = $("#funbox_height").attr("value"); } window.changeShoutboxHeight = function(){ $("iframe[src='shoutbox.php?type=shoutbox']").attr("height", $("#shoutbox_height").attr("value")); localStorage.shoutbox_height = $("#shoutbox_height").attr("value"); } var funbox_height; if(localStorage.funbox_height == undefined || localStorage.funbox_height == null){funbox_height = "300";}else{funbox_height = localStorage.funbox_height;} $("iframe[src='fun.php?action=view']").attr("height", funbox_height); var shoutbox_height; if(localStorage.shoutbox_height == undefined || localStorage.shoutbox_height == null){shoutbox_height = "300";}else{shoutbox_height = localStorage.shoutbox_height;} $("iframe[src='shoutbox.php?type=shoutbox']").attr("height", shoutbox_height); var funbox_element = document.createElement('span'); funbox_element.className = "small"; funbox_element.innerHTML = ' - | | '; $(funbox_element).insertAfter($($("h2:contains('趣味盒')").children("font").get(0))); var shoutbox_element = document.createElement('span'); shoutbox_element.className = "small"; shoutbox_element.innerHTML = ' - | | '; $(shoutbox_element).insertAfter($($("h2:contains('群聊区')").children("font").get(0))); })();