1.02 greasefork update
This commit is contained in:
parent
6699e9416d
commit
4b6cf3f326
|
@ -1,23 +1,23 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name lol just redirect to nitter
|
// @name lol just redirect to nitter
|
||||||
// @namespace https://git.froggi.es/tom/redirect-to-nitter-n-shit/
|
// @namespace https://git.froggi.es/tom/redirect-to-nitter-n-shit/
|
||||||
// @version 0.1
|
// @namespace https://greasyfork.org/en/scripts/448085-lol-just-redirect-to-nitter
|
||||||
|
// @version 0.102
|
||||||
|
// @license GNU GPLv3
|
||||||
// @description see title. edit code for settings.
|
// @description see title. edit code for settings.
|
||||||
// @author Thomas F.
|
// @author Thomas F.
|
||||||
// @match https://twitter.com/*
|
// @match https://twitter.com/*
|
||||||
// @icon https://git.froggi.es/tom/redirect-to-nitter-n-shit/raw/branch/main/icon.ico
|
// @icon https://git.froggi.es/tom/redirect-to-nitter-n-shit/raw/branch/main/icon.ico
|
||||||
// @grant none
|
// @grant none
|
||||||
// @updateURL https://git.froggi.es/tom/redirect-to-nitter-n-shit/raw/branch/main/lol%20just%20redirect%20to%20nitter.user.js
|
|
||||||
// @downloadURL https://git.froggi.es/tom/redirect-to-nitter-n-shit/raw/branch/main/lol%20just%20redirect%20to%20nitter.user.js
|
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
// Settings
|
// Settings
|
||||||
|
|
||||||
let timelineRedirect = true; // Redirect on main home page/timeline? true/false (script's still a wip so getting redirected to nitter by clicking on a tweet on the twitter timeline isn't programmed in yet)
|
let timelineRedirect = true; // Redirect on main home page/timeline? true/false (script's still a wip so getting redirected to nitter by clicking on a tweet on the twitter timeline isn't programmed in yet. true by default until then.)
|
||||||
let nitterInstance = "https://nitter.ca/"; // (PLEASE INCLUDE "https://" AT THE START OF THE DOMAIN AND "/" AT THE END) | What Nitter instance you'd like to be redirected to. Using ".ca" as default because it's the best instance I personally know, I also recommend "twiit.com", which selects an instance that's running well and isn't rate-limited.
|
let nitterInstance = "https://nitter.ca/"; // (PLEASE INCLUDE "https://" AT THE START OF THE DOMAIN AND "/" AT THE END) | What Nitter instance you'd like to be redirected to. Using ".ca" as default because it's the best instance I personally know, I also recommend "twiit.com", which selects an instance that's running well and isn't rate-limited.
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
console.log("is this even loading");
|
// console.log("is this even loading");
|
||||||
|
|
||||||
let href = document.location.href;
|
let href = document.location.href;
|
||||||
var ofm = href.split("/");
|
var ofm = href.split("/");
|
||||||
|
@ -26,14 +26,14 @@ for (var i = 0; i < 2; i++) {
|
||||||
ofm.shift();
|
ofm.shift();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(ofm);
|
// console.log(ofm);
|
||||||
|
|
||||||
var goTo = nitterInstance;
|
var goTo = nitterInstance;
|
||||||
|
|
||||||
if (ofm[1] == "home" || ofm[1] == "" || ofm[1] == "i") {
|
if (ofm[1] == "home" || ofm[1] == "" || ofm[1] == "i") {
|
||||||
console.log("j");
|
console.log("j");
|
||||||
if (timelineRedirect == false) {
|
if (timelineRedirect == false) {
|
||||||
goTo = "false"
|
goTo = "false";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (var m = 1; m < ofm.length; m++) {
|
for (var m = 1; m < ofm.length; m++) {
|
||||||
|
@ -42,8 +42,8 @@ if (ofm[1] == "home" || ofm[1] == "" || ofm[1] == "i") {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (goTo == "false") {
|
if (goTo == "false") {
|
||||||
console.log("no");
|
// console.log("no");
|
||||||
} else {
|
} else {
|
||||||
console.info("this was supposed to redirect to " + goTo);
|
// console.info("this was supposed to redirect to " + goTo);
|
||||||
document.location = goTo;
|
document.location = goTo;
|
||||||
}
|
}
|
Reference in New Issue