Cut about 100 lines from the nebulamain.js file.

This commit is contained in:
wearrrrr 2023-04-12 19:22:04 -05:00
parent db118d95db
commit 0fcc6ad107
3 changed files with 229 additions and 225 deletions

View file

@ -3,5 +3,8 @@
"editor.insertSpaces": true, "editor.insertSpaces": true,
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.formatOnPaste": true, "editor.formatOnPaste": true,
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
}
} }

View file

@ -0,0 +1,154 @@
{
"adjectives": [
"admiring",
"adoring",
"affectionate",
"agitated",
"amazing",
"angry",
"awesome",
"beautiful",
"blissful",
"bold",
"boring",
"brave",
"busy",
"charming",
"clever",
"cool",
"compassionate",
"competent",
"condescending",
"confident",
"cranky",
"crazy",
"dazzling",
"determined",
"distracted",
"dreamy",
"eager",
"ecstatic",
"elastic",
"elated",
"elegant",
"eloquent",
"epic",
"exciting",
"fervent",
"festive",
"flamboyant",
"focused",
"friendly",
"frosty",
"funny",
"gallant",
"gifted",
"goofy",
"gracious",
"great",
"happy",
"hardcore",
"heuristic",
"hopeful",
"hungry",
"infallible",
"inspiring",
"interesting",
"intelligent",
"jolly",
"jovial",
"keen",
"kind",
"laughing",
"loving",
"lucid",
"magical",
"mystifying",
"modest",
"musing",
"naughty",
"nervous",
"nice",
"nifty",
"nostalgic",
"objective",
"optimistic",
"peaceful",
"pedantic",
"pensive",
"practical",
"priceless",
"quirky",
"quizzical",
"recursing",
"relaxed",
"reverent",
"romantic",
"sad",
"serene",
"sharp",
"silly",
"sleepy",
"stoic",
"strange",
"stupefied",
"suspicious",
"sweet",
"tender",
"thirsty",
"trusting",
"unruffled",
"upbeat",
"vibrant",
"vigilant",
"vigorous",
"wizardly",
"wonderful",
"xenodochial",
"youthful",
"zealous",
"zen"
],
"surnames": [
"albattani",
"allen",
"almeida",
"antonelli",
"agnesi",
"archimedes",
"ardinghelli",
"aryabhata",
"austin",
"babbage",
"banach",
"banzai",
"bardeen",
"bartik",
"bassi",
"beaver",
"bell",
"benz",
"bhabha",
"bhaskara",
"black",
"blackburn",
"blackwell",
"bohr",
"booth",
"borg",
"bose",
"bouman",
"boyd",
"brahmagupta",
"brattain",
"brown",
"buck",
"burnell",
"cannon",
"carson",
"cartwright",
"carver",
"cerf",
"chandrasekhar"
]
}

View file

@ -102,7 +102,6 @@ window.addEventListener("load", () => {
return false; return false;
} }
const useNoGG = false;
const proxy = localStorage.getItem("proxy") || "uv"; const proxy = localStorage.getItem("proxy") || "uv";
const inpbox = document.querySelector("form"); const inpbox = document.querySelector("form");
// Display the "loading" indicators on the main page, looks much better than a static/still screen. // Display the "loading" indicators on the main page, looks much better than a static/still screen.
@ -247,29 +246,29 @@ document.addEventListener("visibilitychange", handleTabLeave)
}); });
let tryAbFavi = localStorage.getItem("ABfaviconURL"); let tryAbFavi = localStorage.getItem("ABfaviconURL");
let ABFavicon = ""; let ABFavicon = "";
if (tryAbFavi === null) { if (tryAbFavi === null) {
console.warn("ABfaviconURL is null, Defaulting"); console.warn("ABfaviconURL is null, Defaulting");
ABFavicon = ""; ABFavicon = "";
} else if (tryAbFavi == "") { } else if (tryAbFavi == "") {
console.warn("ABfaviconURL is empty, Defaulting"); console.warn("ABfaviconURL is empty, Defaulting");
ABFavicon = ""; ABFavicon = "";
} else { } else {
ABFavicon = tryAbFavi; ABFavicon = tryAbFavi;
} }
let tryAbTitle = localStorage.getItem("ABtitle"); let tryAbTitle = localStorage.getItem("ABtitle");
let ABTitle = ""; let ABTitle = "";
if (tryAbTitle === null) { if (tryAbTitle === null) {
console.warn("ABtitle is null, Defaulting"); console.warn("ABtitle is null, Defaulting");
ABTitle = ""; ABTitle = "";
} else if (tryAbTitle == "") { } else if (tryAbTitle == "") {
console.warn("ABtitle is empty, Defaulting"); console.warn("ABtitle is empty, Defaulting");
ABTitle = ""; ABTitle = "";
} else { } else {
ABTitle = tryAbTitle; ABTitle = tryAbTitle;
} }
// Stealth engine, a dependency for everything above. // Stealth engine, a dependency for everything above.
function stealthEngine(encodedURL) { function stealthEngine(encodedURL) {
@ -306,7 +305,7 @@ if (tryAbTitle === null) {
doc.head.appendChild(arcSrc); doc.head.appendChild(arcSrc);
const link = location.href; const link = location.href;
img.rel = "icon"; img.rel = "icon";
img.href = ABFavicon || "https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png"; img.href = ABFavicon || "https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png";
doc.title = ABTitle || "Nebula"; doc.title = ABTitle || "Nebula";
var currentLink = link.slice(0, link.length - 1); var currentLink = link.slice(0, link.length - 1);
@ -468,177 +467,39 @@ function switchTheme() {
localStorage.setItem("theme", "light"); localStorage.setItem("theme", "light");
} }
if (selectedOption == 'custom') { if (selectedOption == 'custom') {
changeCSS('--background-primary', localStorage.getItem("--background-primary") , true) changeCSS('--background-primary', localStorage.getItem("--background-primary"), true)
changeCSS('--navbar-color', localStorage.getItem("--navbar-color") , true) changeCSS('--navbar-color', localStorage.getItem("--navbar-color"), true)
changeCSS('--navbar-height', localStorage.getItem("--navbar-height") , true) changeCSS('--navbar-height', localStorage.getItem("--navbar-height"), true)
changeCSS('--navbar-text-color', localStorage.getItem("--navbar-text-color") , true) changeCSS('--navbar-text-color', localStorage.getItem("--navbar-text-color"), true)
changeCSS('--input-text-color', localStorage.getItem("--input-text-color") , true) changeCSS('--input-text-color', localStorage.getItem("--input-text-color"), true)
changeCSS('--input-placeholder-color', localStorage.getItem("--input-placeholder-color") , true) changeCSS('--input-placeholder-color', localStorage.getItem("--input-placeholder-color"), true)
changeCSS('--input-background-color', localStorage.getItem("--input-background-color") , true) changeCSS('--input-background-color', localStorage.getItem("--input-background-color"), true)
changeCSS('--input-border-color', localStorage.getItem("--input-border-color") , true) changeCSS('--input-border-color', localStorage.getItem("--input-border-color"), true)
changeCSS('--input-border-size', localStorage.getItem("--input-border-size") , true) changeCSS('--input-border-size', localStorage.getItem("--input-border-size"), true)
changeCSS('--navbar-link-color', localStorage.getItem("--navbar-link-color") , true) changeCSS('--navbar-link-color', localStorage.getItem("--navbar-link-color"), true)
changeCSS('--navbar-font', localStorage.getItem("--navbar-font") , true) changeCSS('--navbar-font', localStorage.getItem("--navbar-font"), true)
changeCSS('--navbar-logo-filter', localStorage.getItem("--navbar-logo-filter") , true) changeCSS('--navbar-logo-filter', localStorage.getItem("--navbar-logo-filter"), true)
changeCSS('--text-color-primary', localStorage.getItem("--text-color-primary") , true) changeCSS('--text-color-primary', localStorage.getItem("--text-color-primary"), true)
localStorage.setItem('theme', 'custom') localStorage.setItem('theme', 'custom')
} }
} }
// Adjectives and surnames for a more advanced stealth engine. // Adjectives and surnames for a more advanced stealth engine.
// Used together to generate random names for the tab name // Used together to generate random names for the tab name
const adjectives = [ let adjectives;
"admiring", let surnames;
"adoring",
"affectionate", async function surnameAdjectivesData() {
"agitated", await fetch("/resources/adjectives_surnames.json")
"amazing", .then((response) => response.json())
"angry", .then((data) => {
"awesome", adjectives = data.adjectives;
"beautiful", surnames = data.surnames;
"blissful", })
"bold", }
"boring", surnameAdjectivesData();
"brave",
"busy",
"charming",
"clever",
"cool",
"compassionate",
"competent",
"condescending",
"confident",
"cranky",
"crazy",
"dazzling",
"determined",
"distracted",
"dreamy",
"eager",
"ecstatic",
"elastic",
"elated",
"elegant",
"eloquent",
"epic",
"exciting",
"fervent",
"festive",
"flamboyant",
"focused",
"friendly",
"frosty",
"funny",
"gallant",
"gifted",
"goofy",
"gracious",
"great",
"happy",
"hardcore",
"heuristic",
"hopeful",
"hungry",
"infallible",
"inspiring",
"interesting",
"intelligent",
"jolly",
"jovial",
"keen",
"kind",
"laughing",
"loving",
"lucid",
"magical",
"mystifying",
"modest",
"musing",
"naughty",
"nervous",
"nice",
"nifty",
"nostalgic",
"objective",
"optimistic",
"peaceful",
"pedantic",
"pensive",
"practical",
"priceless",
"quirky",
"quizzical",
"recursing",
"relaxed",
"reverent",
"romantic",
"sad",
"serene",
"sharp",
"silly",
"sleepy",
"stoic",
"strange",
"stupefied",
"suspicious",
"sweet",
"tender",
"thirsty",
"trusting",
"unruffled",
"upbeat",
"vibrant",
"vigilant",
"vigorous",
"wizardly",
"wonderful",
"xenodochial",
"youthful",
"zealous",
"zen"
],
surnames = [
"albattani",
"allen",
"almeida",
"antonelli",
"agnesi",
"archimedes",
"ardinghelli",
"aryabhata",
"austin",
"babbage",
"banach",
"banzai",
"bardeen",
"bartik",
"bassi",
"beaver",
"bell",
"benz",
"bhabha",
"bhaskara",
"black",
"blackburn",
"blackwell",
"bohr",
"booth",
"borg",
"bose",
"bouman",
"boyd",
"brahmagupta",
"brattain",
"brown",
"buck",
"burnell",
"cannon",
"carson",
"cartwright",
"carver",
"cerf",
"chandrasekhar"
];
// Random number generator // Random number generator
// Dependency of getRandomName function // Dependency of getRandomName function
@ -698,44 +559,30 @@ function handleTabLeave() {
document.addEventListener("visibilitychange", handleTabLeave); document.addEventListener("visibilitychange", handleTabLeave);
const stealthStored = localStorage.getItem('nogg') const stealthStored = localStorage.getItem('nogg')
function link (_link) { function link(_link) {
if (stealthStored == 'on') { if (stealthStored == "on") {
let inFrame let inFrame
try { try { inFrame = window !== top } catch (e) { inFrame = true }
inFrame = window !== top;
} catch (e) {
inFrame = true;
}
setTimeout(() => { setTimeout(() => {
if (!inFrame && !navigator.userAgent.includes("Firefox")) { if (!inFrame && !navigator.userAgent.includes("Firefox")) {
const popup = open("about:blank", "_blank"); const popup = open("about:blank", "_blank")
if (!popup || popup.closed) { if (!popup || popup.closed) { alert("Popups are disabled!") } else {
alert("Popups are disabled!"); const doc = popup.document
} else { const iframe = doc.createElement("iframe")
const doc = popup.document; const style = iframe.style
const iframe = doc.createElement("iframe"); const img = doc.createElement("link")
const style = iframe.style; img.rel = "icon"
const img = doc.createElement("link"); img.href = "https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png"
const link = location.href; doc.title = getRandomName()
img.rel = "icon"; var currentLink = _link.slice(0, _link.length - 1)
img.href = iframe.src = location.origin + "/service/go/" + __uv$config.encodeUrl(currentLink)
"https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png"; style.position = "fixed"
doc.title = getRandomName();
var currentLink = _link.slice(0, _link.length - 1);
iframe.src =
location.origin +
"/service/go/" +
__uv$config.encodeUrl(currentLink)
style.position = 'fixed'
style.top = style.bottom = style.left = style.right = 0 style.top = style.bottom = style.left = style.right = 0
style.border = style.outline = 'none' style.border = style.outline = "none"
style.width = style.height = '100%' style.width = style.height = "100%"
doc.body.appendChild(iframe) doc.body.appendChild(iframe)
} }
} }
}, 0200); }, 0200)
} else { } else { location.href = "service/go/" + __uv$config.encodeUrl("https://radon.games/") }
location.href =
"service/go/" + __uv$config.encodeUrl("https://radon.games/");
}
} }