scripts-greasemonkey: Improve log message

* fix change indent-spaces: 4 to 2
This commit is contained in:
Jesús 2020-07-05 16:54:17 -05:00
parent f2c9969b12
commit cca78b770c
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
7 changed files with 241 additions and 246 deletions

View File

@ -6,7 +6,7 @@
// @homepageURL https://libregit.spks.xyz/heckyel/book/src/branch/master/scripts-greasemonkey
// @include *
// @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
// ==/UserScript==
/* jshint esversion: 6 */

View File

@ -8,7 +8,7 @@
// @exclude /^http(s|)://(www[.]|)bibliogram[.]art/.*$/
// @exclude /^http(s|)://(www[.]|)bibliogram[.]snopyta[.]org/.*$/
// @exclude /^http(s|)://(www[.]|)bibliogram[.]pussthecat[.]org/.*$/
// @version 0.1.5
// @version 0.1.6
// @grant none
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
// ==/UserScript==
@ -18,7 +18,10 @@
let instance = 'bibliogram.snopyta.org';
// 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
function rewriteLinks() {
@ -28,12 +31,7 @@ function rewriteLinks() {
elem.href='https://' + instance + '/u/' + RegExp.$4;
}
}
statuscheck()
}
function statuscheck(){
// Console Feedback
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
log('successfully initialized');
}
window.addEventListener('load', () => {

View File

@ -17,14 +17,17 @@
// @exclude /^http(s|)://(www[.]|)invidious[.]enkirton[.]net/.*$/
// @exclude /^http(s|)://(www[.]|)tube[.]poal[.]co/.*$/
// @exclude /^http(s|)://(www[.]|)invidious[.]13ad[.]de/.*$/
// @version 1.0.4
// @version 1.0.5
// @grant none
// ==/UserScript==
let instance = 'invidio.us' // set instance
// 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 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]);
}
function statuscheck(){
// Console Feedback
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
}
statuscheck()
log('successfully initialized');

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name Invidious - Proxy Mode
// @version 0.1.8
// @version 0.1.9
// @author Jesús E.
// @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.
@ -22,6 +22,9 @@
function proxyMode() {
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
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();

View File

@ -13,7 +13,7 @@
// @exclude /^http(s|)://(www[.]|)nitter[.]nixnet[.]xyz/.*$/
// @exclude /^http(s|)://(www[.]|)nitter[.]drycat[.]fr/.*$/
// @exclude /^http(s|)://(www[.]|)tw[.]openalgeria[.]org/.*$/
// @version 0.1.3
// @version 0.1.4
// @grant none
// @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
// ==/UserScript==
@ -23,7 +23,10 @@
let instance = 'nitter.net';
// 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
function rewriteLinks() {
@ -33,12 +36,7 @@ function rewriteLinks() {
elem.href='https://' + instance + '/' + RegExp.$4;
}
}
statuscheck()
}
function statuscheck(){
// Console Feedback
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
log('successfully initialized');
}
window.addEventListener('load', () => {

View File

@ -16,7 +16,7 @@
// @exclude /^http(s|)://(www[.]|)tube[.]poal[.]co/.*$/
// @exclude /^http(s|)://(www[.]|)invidious[.]13ad[.]de/.*$/
// @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
// ==/UserScript==
/* jshint esversion: 6 */
@ -25,7 +25,10 @@
let instance = 'invidio.us';
// 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
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 thumbs,links,skip;
function statuscheck(){
// Console Feedback
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
}
function link(){
for(let i=0;i<links.length;i++){
let url=new URL(links[i].href.match(ytdomains)[0]);
@ -101,7 +99,7 @@ if(current){
if(links.length>0){
link();
}
statuscheck();
log('successfully initialized');
}else{
let title=Array.prototype.slice.call(document.getElementsByTagName('h1'));
addbtn();