咕咕镇屏幕适配

修改样式

Fra 15.09.2020. Se den seneste versjonen.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         咕咕镇屏幕适配
// @namespace    http://tampermonkey.net/
// @version      2.0.0
// @description
// @author       aotmd
// @match        https://www.guguzhen.com/*
// @grant        none
// @description 修改样式
// ==/UserScript==
function addStyle(rules) {
        var styleElement = document.createElement('style');
        styleElement.type = 'text/css';
        document.getElementsByTagName('head')[0].appendChild(styleElement);
        styleElement.appendChild(document.createTextNode(rules));
    }
    addStyle(`
div[style='width:1200px;margin: 0 auto;'] {
    width: 70%!important;
}
    `);
/*addStyle(`
#pkcall,#closeresult {
    border: none;
    color: white;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 10px;
    margin: 4px 10px;
    width: 100px;
    border-radius: 15px;
    -webkit-transition-duration: 0.4s;
    transition-duration: 0.4s;
    cursor: pointer;
    background-color: white;
    color: black;
    border: 2px solid #4CAF50;
}
#pkcall:hover,#closeresult:hover {
    background-color: #4CAF50;
    color: white;
}
div#result {
    line-height: 1;
    padding: 10px;
    padding-bottom: 50px;
    border: 2px solid transparent;
    border-color: #9d15f3;
    width: 100px;
    text-align: center;
    margin: 10px;
    border-radius: 10px;
    transition-duration: 1s;
}
div#result:hover {
    background-color: #2ae23894;
    border-color: #ffffff00;
}
	`);*/
/*var b= document.getElementsByClassName("panel panel-primary")[0];
b.innerHTML = "<button id='pkcall'>导出怪兽数据</button>" + b.innerHTML;
var jsjfunction=function () {
		var pk = document.getElementsByClassName("btn dropdown-toggle fyg_lh40");
		var s = "<div id='result'>";
		for (var i = 0; i < 10; ++i) {
			var temp = pk[i].innerText.trim();
			var name = temp.slice(-1);
			var lv = temp.slice(temp.indexOf("Lv") + 2, temp.lastIndexOf(" "));
			switch (name) {
				case "人": name = "MU"; break;
				case "蛛": name = "ZHU"; break;
				case "灵": name = "DENG"; break;
				case "兽": name = "SHOU"; break;
				default : alert("erreo");
			}
			var parameter=name+" "+lv;
			for (var j = 0; j <= 3; j++) {
				s += "<div>" + parameter +" "+j+ "</div>";
			}
		}
		s += "</div>";
		b.innerHTML = s+"<button id='closeresult'>清除怪兽数据</button>" + b.innerHTML;
		$("#pkcall").remove();
		$("#closeresult").click(function(){
			b.innerHTML = "<button id='pkcall'>导出怪兽数据</button>" + b.innerHTML;
			$("#pkcall").click(jsjfunction);
			$("#result").remove();
			$("#closeresult").remove();
		});
	};
$(document).ready(function() {
	$("#pkcall").click(jsjfunction);
});*/