您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Centralize IP Dounford Styles
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/506089/1440715/IP%20Dounford%20Scripts%20Styles.js
- // ==UserScript==
- // @name IP Dounford Scripts Styles
- // @version 1.0.2
- // @description Centralize IP Dounford Styles
- // @author Dounford
- // @license MIT
- // @match *://idle-pixel.com/login/play*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- function isNewerVersion () {
- const oldParts = document.getElementById('dounfordStyles').getAttribute('version').split('.')
- const newParts = GM_info.script.version.split('.')
- for (let i = 0; i < newParts.length; i++) {
- const a = ~~newParts[i]
- const b = ~~oldParts[i]
- if (a > b) return true
- if (a < b) return false
- }
- return false
- }
- (function addStyles() {
- let style = document.createElement('style');
- style.id = "dounfordStyles"
- style.setAttribute('version', GM_info.script.version)
- const styleHTML = `
- /* Hover */
- .dounfordHover:hover {
- cursor: pointer;
- background-color: rgb(225 225 225);
- }
- /* Modal Style */
- dialog::backdrop {
- background-color: rgba(0, 0, 0, 0.855);
- }
- .dounfordModal {
- padding: 0;
- width: 600px;
- background-color: #e5e5e5;
- border-radius: 0.5rem;
- overflow: visible;
- }
- .dounfordModal label {
- margin-left: 5px;
- }
- .dounfordModalHeader {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 1rem;
- border-bottom: 1px solid #ccc;
- }
- .dounfordModalBody {
- padding: 1rem;
- text-align: center;
- }
- .dounfordModalFooter {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- padding: 0.75rem;
- border-top: 1px solid #ccc;
- }
- .dounfordModalFooter > * {
- margin: 0.25rem;
- }
- /* Blocked User Modal */
- .blockedUser {
- display: flex;
- justify-content: space-between;
- padding: 10px;
- border-radius: 10px;
- font-weight: bold;
- align-items: center;
- }
- .blockedUser:hover {
- background-color: aliceblue;
- }
- /* Tooltips*/
- [dounfordTooltip] {
- position: relative;
- border-bottom: 1px dashed #000;
- }
- [dounfordTooltip]::after {
- position: absolute;
- z-index: 10;
- opacity: 0;
- pointer-events: none;
- content: attr(dounfordTooltip);
- left: 0;
- top: calc(100% + 10px);
- border-radius: 3px;
- box-shadow: 0 0 5px 2px rgba(100, 100, 100, 0.6);
- background-color: black;
- color: white;
- padding: 5px;
- width: 200px;
- }
- [dounfordTooltip]:hover::after {
- opacity: 1;
- }
- /* PVP Tab */
- .dounfordPVPGrid {
- display: grid;
- grid-template-columns: 1fr 1fr;
- grid-template-rows: 1fr 1fr;
- color: white;
- }
- .dounfordPVPTitles {
- color: black;
- display: inline-block;
- padding: 10px;
- border: 2px solid gold;
- background-color: white;
- border-radius: 5px;
- margin: 5px;
- font-size: 1.2rem;
- }
- .dounfordPVPTitles {
- display: inline-flex;
- align-items: center;
- gap: 5px;
- border: 2px solid gold;
- border-radius: 5px;
- padding: 10px;
- font-size: 1.2rem;
- background-color: white;
- color: black;
- }
- `;
- if (document.getElementById('dounfordStyles')) {
- if (!isNewerVersion()) return
- document.getElementById('dounfordStyles').innerHTML = styleHTML
- document.getElementById('dounfordStyles').setAttribute('version', GM_info.script.version)
- } else {
- style.innerHTML = styleHTML
- document.head.appendChild(style);
- }
- })()
- })()