Greasy Fork

Greasy Fork is available in English.

洛谷学术神器

隐藏:犇犇、讨论、私信、通知等,专心刷题!

当前为 2020-06-22 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         洛谷学术神器
// @namespace    http://tampermonkey.net/
// @version      0.101
// @description  隐藏:犇犇、讨论、私信、通知等,专心刷题!
// @author      TNT°
// @match        *://*.luogu.com.cn/*
// @match        *://*.luogu.org/*
// @grant        none
// ==/UserScript==
  (function () {
  $('document').ready(function(){setTimeout(function () {
    var benben_01 = 0, discuss_01 = 0, chat_01 = 0, notification_01 = 0;

    $sidebar = $('#app-old .lg-index-content .lg-right.am-u-lg-3');
    $firstele = $($sidebar.children()[0]);
   $finder = $(`
<div class="lg-article" id="console-form">
<script>
function save_benben_01(){
    var benben_txt;
    benben_txt = $('[name=inbenben]')[0].value;
    localStorage.benben_storage = benben_txt;
    return benben_txt;
}
function save_benben_1(){

}
function save_benben_0(){

}
function save_discuss_1(){

}
function save_discuss_0(){

}
function save_chat_1(){

}
function save_chat_0(){

}
function save_notification_1(){

}
function save_notification_0(){

}
</script>
<h3 align="center">学术控制台</h3>
<div align="center">
是否隐藏犇犇<br>
</div>
<div align="center">
<button class="am-btn am-btn-sm am-btn-primary lg-left" style="background: rgb(82, 196, 26) none repeat scroll 0% 0%; color: rgb(255, 255, 255);" id="benben-button_1" onclick="save_benben_1()">是</button>
<button class="am-btn am-btn-sm am-btn-primary lg-right" style="background: rgb(254, 76, 97) none repeat scroll 0% 0%; color: rgb(255, 255, 255);" id="benben-button_0" onclick="save_benben_0()">否</button><br><br>
是否隐藏讨论<br>
<button class="am-btn am-btn-sm am-btn-primary lg-left" style="background: rgb(82, 196, 26) none repeat scroll 0% 0%; color: rgb(255, 255, 255); id="discuss-button_1" onclick="save_discuss_1()">是</button>
<button class="am-btn am-btn-sm am-btn-primary lg-right" style="background: rgb(254, 76, 97) none repeat scroll 0% 0%; color: rgb(255, 255, 255);" id="discuss-button_0" onclick="save_discuss_0()">否</button><br><br>
是否隐藏私信<br>
<button class="am-btn am-btn-sm am-btn-primary lg-left" style="background: rgb(82, 196, 26) none repeat scroll 0% 0%; color: rgb(255, 255, 255);" id="chat-button_1" onclick="save_chat_1()">是</button>
<button class="am-btn am-btn-sm am-btn-primary lg-right" style="background: rgb(254, 76, 97) none repeat scroll 0% 0%; color: rgb(255, 255, 255);" id="chat-button_0" onclick="save_chat_0()">否</button><br><br>
是否隐藏通知<br>
<button class="am-btn am-btn-sm am-btn-primary lg-left" style="background: rgb(82, 196, 26) none repeat scroll 0% 0%; color: rgb(255, 255, 255);" id="notification-button_1" onclick="save_notification_1()">是</button>
<button class="am-btn am-btn-sm am-btn-primary lg-right" style="background: rgb(254, 76, 97) none repeat scroll 0% 0%; color: rgb(255, 255, 255);" id="notification-button_0" onclick="save_notification_0()">否</button><br><br>
</div>
<div align="center"><small><small>你可以在这里控制你想打开的学术模式哦qwq</small></small></div>
<small><small>反馈问题:<a href="https://www.luogu.com.cn/chat?uid=128369" target="_blank">洛谷私信</a> or <a href="http://greasyfork.icu/zh-CN/scripts/405841/feedback" target="_blank">讨论</a></small></small>
</div>
`);
$finder.insertAfter($firstele);
var css="";
css += [".lg-index-benben>div+div+div {display: none!important}"
       ].join("\n");
  },500)});
})();