您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a line to Volafile chat showing the line last read
当前为
- // ==UserScript==
- // @name Volafile Mark Read
- // @author Arnold François Lecherche and a Vola anon named Adonis
- // @namespace greasyfork.org
- // @icon https://volafile.org/favicon.ico
- // @version 1.02
- // @description Adds a line to Volafile chat showing the line last read
- // @include http://volafile.org/*
- // @include http://*.volafile.org/*
- // @include https://volafile.org/*
- // @include https://*.volafile.org/*
- // @grant none
- // @run-at document-end
- // @copyright 2020 Arnold François Lecherche
- // ==/UserScript==
- (function (w, d, b, g, m, c) {
- 'use strict';
- var pr = [w.prog0 || d.createElement('div'), w.prog1 || d.createElement('div')],
- u = d.getElementById('dolos_cuckmenu'),
- n = ['chat_message', 'filelist_file'],
- i = pr.length, s, k;
- function reloadMarker(e) {
- var key = e.key || e.charCode || e.keyCode, sf, i;
- if (!key) return;
- if (key === 'Escape' || key === 'Esc' || key === 27) {
- if (g.chat_max_history < 1000) g.chat_max_history = 1000;
- m.appendChild(w.prog0);
- w.file_list.insertBefore(w.prog1, w.file_list.querySelector('#file_list .filelist_file:not(.file_uploading):not(.file_queued)'));
- sf = m.querySelectorAll('.chat_message.staff:not(.profile)');
- i = sf.length;
- while (i--) if (sf[i].querySelector('.username').innerText.substr(0, 5) === 'News:') m.removeChild(sf[i]);
- }
- }
- function refreshConfig() {
- var pin = d.querySelector('.ui_frame_table [name="password"]'), b, i;
- if (g.chat_max_history < 1000) g.chat_max_history = 1000;
- if (pin) {
- b = d.querySelectorAll('.ui_frame_buttons .button:not(.light)');
- i = b.length;
- while (i--) b[i].click();
- }
- }
- function unCuck() {
- u = d.getElementById('dolos_cuckmenu');
- if (u) {
- u.style.fontSize = '75%';
- if (k) w.clearInterval(k);
- }
- }
- w.addEventListener('DOMContentLoaded', unCuck, false);
- w.addEventListener('load', unCuck, false);
- if (u) u.style.fontSize = '75%';
- else k = w.setInterval(unCuck, 100);
- w.chat_scroller.style.borderTop = '4px dotted #597895';
- if (g.chat_max_history < 1000) g.chat_max_history = 1000;
- while (i--) {
- s = pr[i].style;
- pr[i].className = n[i];
- pr[i].setAttribute('id', 'prog' + i);
- s.borderTop = '3px dashed #f88';
- s.height = '3px';
- s.overflow = 'hidden';
- s.color = 'rgba(0,0,0,0)';
- pr[i].innerText = 'qwerty';
- b.appendChild(pr[i]);
- }
- w.addEventListener('keydown', reloadMarker, false);
- c.showMessage('Script', 'vola marker line loaded', {'dontsave': true, 'staff': true});
- g.bump = w.setInterval(refreshConfig, 60000);
- })(window, document, document.body || body, window.config, window.chat_messages, window.Room.prototype._extensions.connection.prototype.room.extensions.chat);