scripts-greasemonkey: Improve log message
* fix change indent-spaces: 4 to 2
This commit is contained in:
parent
f2c9969b12
commit
cca78b770c
@ -6,7 +6,7 @@
|
|||||||
// @homepageURL https://libregit.spks.xyz/heckyel/book/src/branch/master/scripts-greasemonkey
|
// @homepageURL https://libregit.spks.xyz/heckyel/book/src/branch/master/scripts-greasemonkey
|
||||||
// @include *
|
// @include *
|
||||||
// @grant none
|
// @grant none
|
||||||
// @version 0.0.1
|
// @version 0.0.2
|
||||||
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
/* jshint esversion: 6 */
|
/* jshint esversion: 6 */
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// @exclude /^http(s|)://(www[.]|)bibliogram[.]art/.*$/
|
// @exclude /^http(s|)://(www[.]|)bibliogram[.]art/.*$/
|
||||||
// @exclude /^http(s|)://(www[.]|)bibliogram[.]snopyta[.]org/.*$/
|
// @exclude /^http(s|)://(www[.]|)bibliogram[.]snopyta[.]org/.*$/
|
||||||
// @exclude /^http(s|)://(www[.]|)bibliogram[.]pussthecat[.]org/.*$/
|
// @exclude /^http(s|)://(www[.]|)bibliogram[.]pussthecat[.]org/.*$/
|
||||||
// @version 0.1.5
|
// @version 0.1.6
|
||||||
// @grant none
|
// @grant none
|
||||||
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
@ -18,7 +18,10 @@
|
|||||||
let instance = 'bibliogram.snopyta.org';
|
let instance = 'bibliogram.snopyta.org';
|
||||||
|
|
||||||
// Console Style - Debug
|
// Console Style - Debug
|
||||||
let consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
||||||
|
const name = GM_info.script.name;
|
||||||
|
const version = GM_info.script.version;
|
||||||
|
const log = (...args) => console.log('%cUSERSCRIPT | %s %s | %s', consoleCSS, name, version, ...args);
|
||||||
|
|
||||||
// Do the actual rewrite
|
// Do the actual rewrite
|
||||||
function rewriteLinks() {
|
function rewriteLinks() {
|
||||||
@ -28,12 +31,7 @@ function rewriteLinks() {
|
|||||||
elem.href='https://' + instance + '/u/' + RegExp.$4;
|
elem.href='https://' + instance + '/u/' + RegExp.$4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
statuscheck()
|
log('successfully initialized');
|
||||||
}
|
|
||||||
|
|
||||||
function statuscheck(){
|
|
||||||
// Console Feedback
|
|
||||||
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('load', () => {
|
window.addEventListener('load', () => {
|
||||||
|
@ -17,14 +17,17 @@
|
|||||||
// @exclude /^http(s|)://(www[.]|)invidious[.]enkirton[.]net/.*$/
|
// @exclude /^http(s|)://(www[.]|)invidious[.]enkirton[.]net/.*$/
|
||||||
// @exclude /^http(s|)://(www[.]|)tube[.]poal[.]co/.*$/
|
// @exclude /^http(s|)://(www[.]|)tube[.]poal[.]co/.*$/
|
||||||
// @exclude /^http(s|)://(www[.]|)invidious[.]13ad[.]de/.*$/
|
// @exclude /^http(s|)://(www[.]|)invidious[.]13ad[.]de/.*$/
|
||||||
// @version 1.0.4
|
// @version 1.0.5
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
let instance = 'invidio.us' // set instance
|
let instance = 'invidio.us' // set instance
|
||||||
|
|
||||||
// Console Style - Debug
|
// Console Style - Debug
|
||||||
let consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
||||||
|
const name = GM_info.script.name;
|
||||||
|
const version = GM_info.script.version;
|
||||||
|
const log = (...args) => console.log('%cUSERSCRIPT | %s %s | %s', consoleCSS, name, version, ...args);
|
||||||
|
|
||||||
let i, j, k, index;
|
let i, j, k, index;
|
||||||
let video_id, video_url, video_link;
|
let video_id, video_url, video_link;
|
||||||
@ -86,9 +89,4 @@ for (i = 0; i < bad_ids.length; i++) {
|
|||||||
bad_elements[i].parentNode.replaceChild(video_link, bad_elements[i]);
|
bad_elements[i].parentNode.replaceChild(video_link, bad_elements[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function statuscheck(){
|
log('successfully initialized');
|
||||||
// Console Feedback
|
|
||||||
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
|
|
||||||
}
|
|
||||||
|
|
||||||
statuscheck()
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Invidious - Proxy Mode
|
// @name Invidious - Proxy Mode
|
||||||
// @version 0.1.8
|
// @version 0.1.9
|
||||||
// @author Jesús E.
|
// @author Jesús E.
|
||||||
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
// @description This script automatically Proxy-Mode on Invidious and its various public instances.
|
// @description This script automatically Proxy-Mode on Invidious and its various public instances.
|
||||||
@ -22,6 +22,9 @@
|
|||||||
|
|
||||||
function proxyMode() {
|
function proxyMode() {
|
||||||
const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
||||||
|
const name = GM_info.script.name;
|
||||||
|
const version = GM_info.script.version;
|
||||||
|
const log = (...args) => console.log('%cUSERSCRIPT | %s %s | %s', consoleCSS, name, version, ...args);
|
||||||
|
|
||||||
// Set variables
|
// Set variables
|
||||||
let i, j, url;
|
let i, j, url;
|
||||||
@ -43,7 +46,7 @@ function proxyMode() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
|
log('successfully initialized');
|
||||||
}
|
}
|
||||||
proxyMode();
|
proxyMode();
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
// @exclude /^http(s|)://(www[.]|)nitter[.]nixnet[.]xyz/.*$/
|
// @exclude /^http(s|)://(www[.]|)nitter[.]nixnet[.]xyz/.*$/
|
||||||
// @exclude /^http(s|)://(www[.]|)nitter[.]drycat[.]fr/.*$/
|
// @exclude /^http(s|)://(www[.]|)nitter[.]drycat[.]fr/.*$/
|
||||||
// @exclude /^http(s|)://(www[.]|)tw[.]openalgeria[.]org/.*$/
|
// @exclude /^http(s|)://(www[.]|)tw[.]openalgeria[.]org/.*$/
|
||||||
// @version 0.1.3
|
// @version 0.1.4
|
||||||
// @grant none
|
// @grant none
|
||||||
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
@ -23,7 +23,10 @@
|
|||||||
let instance = 'nitter.net';
|
let instance = 'nitter.net';
|
||||||
|
|
||||||
// Console Style - Debug
|
// Console Style - Debug
|
||||||
let consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
||||||
|
const name = GM_info.script.name;
|
||||||
|
const version = GM_info.script.version;
|
||||||
|
const log = (...args) => console.log('%cUSERSCRIPT | %s %s | %s', consoleCSS, name, version, ...args);
|
||||||
|
|
||||||
// Do the actual rewrite
|
// Do the actual rewrite
|
||||||
function rewriteLinks() {
|
function rewriteLinks() {
|
||||||
@ -33,12 +36,7 @@ function rewriteLinks() {
|
|||||||
elem.href='https://' + instance + '/' + RegExp.$4;
|
elem.href='https://' + instance + '/' + RegExp.$4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
statuscheck()
|
log('successfully initialized');
|
||||||
}
|
|
||||||
|
|
||||||
function statuscheck(){
|
|
||||||
// Console Feedback
|
|
||||||
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('load', () => {
|
window.addEventListener('load', () => {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// @exclude /^http(s|)://(www[.]|)tube[.]poal[.]co/.*$/
|
// @exclude /^http(s|)://(www[.]|)tube[.]poal[.]co/.*$/
|
||||||
// @exclude /^http(s|)://(www[.]|)invidious[.]13ad[.]de/.*$/
|
// @exclude /^http(s|)://(www[.]|)invidious[.]13ad[.]de/.*$/
|
||||||
// @grant none
|
// @grant none
|
||||||
// @version 8.4.8
|
// @version 8.4.9
|
||||||
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
/* jshint esversion: 6 */
|
/* jshint esversion: 6 */
|
||||||
@ -25,7 +25,10 @@
|
|||||||
let instance = 'invidio.us';
|
let instance = 'invidio.us';
|
||||||
|
|
||||||
// Console Style - Debug
|
// Console Style - Debug
|
||||||
let consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
|
||||||
|
const name = GM_info.script.name;
|
||||||
|
const version = GM_info.script.version;
|
||||||
|
const log = (...args) => console.log('%cUSERSCRIPT | %s %s | %s', consoleCSS, name, version, ...args);
|
||||||
|
|
||||||
// change script options, default values recommended
|
// change script options, default values recommended
|
||||||
let a=1; //set to 0 to force autoplay off, set to 1 to keep embed's value [default 1]
|
let a=1; //set to 0 to force autoplay off, set to 1 to keep embed's value [default 1]
|
||||||
@ -36,11 +39,6 @@ let params=new RegExp(/^(autoplay|channel|v|playlist|list)$/);
|
|||||||
let current=window.location.href.match(ytdomains)===null;
|
let current=window.location.href.match(ytdomains)===null;
|
||||||
let thumbs,links,skip;
|
let thumbs,links,skip;
|
||||||
|
|
||||||
function statuscheck(){
|
|
||||||
// Console Feedback
|
|
||||||
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
|
|
||||||
}
|
|
||||||
|
|
||||||
function link(){
|
function link(){
|
||||||
for(let i=0;i<links.length;i++){
|
for(let i=0;i<links.length;i++){
|
||||||
let url=new URL(links[i].href.match(ytdomains)[0]);
|
let url=new URL(links[i].href.match(ytdomains)[0]);
|
||||||
@ -101,7 +99,7 @@ if(current){
|
|||||||
if(links.length>0){
|
if(links.length>0){
|
||||||
link();
|
link();
|
||||||
}
|
}
|
||||||
statuscheck();
|
log('successfully initialized');
|
||||||
}else{
|
}else{
|
||||||
let title=Array.prototype.slice.call(document.getElementsByTagName('h1'));
|
let title=Array.prototype.slice.call(document.getElementsByTagName('h1'));
|
||||||
addbtn();
|
addbtn();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user