我是新的脚本,html, css的东西。基本上我什么都不知道。如果我遗漏了一些标签,我很抱歉。D:)
我正试图制作一个脚本来删除/隐藏描述和边界底部1周,但仍然没有进展。这是一款名为《sploop》的网页游戏。我想让帽子菜单看起来更好。
图片:<p class="description">
=>https://i.stack.imgur.com/8JhMs.jpg, Border-bottom =>https://i.stack.imgur.com/GDN9g.jpg
// ==UserScript==
// @name Sploop.io Better Hat Menu
// @version 0.1
// @description Better Hat Menu
// @author s
// @match https://sploop.io/
// @icon none
// @grant none
// ==/UserScript==
(function() {
'use strict';
document.getElementById('da-left').style = "display:none;"
document.getElementById('da-right').style = "display:none;"
document.getElementById('bottom-content').style = "display:none;"
document.getElementById('alsoTryLink').style = "display:none;"
document.getElementById('cross-promo').style = "display:none;"
document.getElementById('google_play').style = "display:none;"
document.getElementById('iogames').style = "display:none;"
document.getElementById("hat-menu").style = "display: flex; opacity: 1; height: 320px; width: 400px; box-shadow: 0px 0px; border: 0px solid; border-radius: 0px; box-sizing: border-box; background: rgba(40, 45, 34, 0.3);";
document.getElementById("hat_menu_content").style = "width: 400px; background: rgb(20 20 20 / 0%); box-shadow: inset 0 5px 0 rgb(20 20 20 / 0%); margin: 20px 0 0px 0; border: 0px solid #141414";
})();
这是我现在用于帽子菜单的代码,我只需要删除/隐藏描述和border-bottom那就完成了,但我不知道怎么做,所以我来这里寻求帮助,如何删除/隐藏它们
只需这样做:
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://sploop.io/
// @icon https://www.google.com/s2/favicons?domain=sploop.io
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==
GM_addStyle(`
.description {
visibility: hidden !important;
}
.menu-item {
border-bottom: none !important;
}
`);
参考:https://stackoverflow.com/a/19392142/11613622