Merge pull request #97 from wearrrrr/surname_adjective_patch

Cut about 100 lines from the nebulamain.js file! 🎉
This commit is contained in:
Green! 2023-04-13 08:26:38 -04:00 committed by GitHub
commit 110ebfe99b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 434 additions and 428 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"
}
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"version":3,"file":"osana.config.js","mappings":"mBAAAA,KAAKC,eAAiB,CAClBC,KAAM,GAAGC,SAASC,eAClBC,OAAQ,WACRC,MAAON,KAAKO,eAAeC,OAAOC,KAClCC,MAAO,CACHC,OAAQ,mBACRC,OAAQ,mBACRC,OAAQ,mBACRC,OAAQ,oBAEZC,UAAW,CACP,wBACA,0B","sources":["webpack://osana/./src/config.ts"],"sourcesContent":["self.__osana$config = {\n bare: `${location.origin}/bare/`,\n prefix: \"/~osana/\",\n codec: self.__osana$bundle.codecs.none,\n files: {\n config: \"/osana.config.js\",\n client: \"/osana.client.js\",\n bundle: \"/osana.bundle.js\",\n worker: \"/osana.worker.js\"\n },\n blacklist: [\n /^(www\\.)?netflix\\.com/,\n /^accounts\\.google\\.com/,\n ]\n};\nexport {};\n"],"names":["self","__osana$config","bare","location","origin","prefix","codec","__osana$bundle","codecs","none","files","config","client","bundle","worker","blacklist"],"sourceRoot":""}

File diff suppressed because one or more lines are too long

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

@ -0,0 +1,49 @@
// Get's the current day using the Date function built in.
// A dependency for displaying time - displayTime(void)
function getDayName(dateStr, locale) {
var date = new Date(dateStr);
return date.toLocaleDateString(locale, { weekday: "long" });
}
// The main function to show the time on the main page
// needs to be initialized by a call (only one)
// Dependent on getDayName function
function displayTime() {
var date = new Date();
var h = date.getHours(); // 0 - 23
var m = date.getMinutes(); // 0 - 59
var s = date.getSeconds(); // 0 - 59
var session = "AM";
h = h == 12 ? 24 : h;
if (h == 0) {
h = 12;
} else if (h >= 12) {
h = h - 12;
session = "PM";
}
h = h < 10 ? "0" + h : h;
m = m < 10 ? "0" + m : m;
s = s < 10 ? "0" + s : s;
// Repeat itself every second
setTimeout(displayTime, 1000);
// Get today's date
var today = new Date();
var dd = String(today.getDate()).padStart(2, "0");
var mm = String(today.getMonth() + 1).padStart(2, "0"); //January is 0!
var yyyy = today.getFullYear();
today = mm + "/" + dd + "/" + yyyy;
var time =
h + "<span style='opacity:100%;' class='clockColon'>:</span>" + m;
try {
document.getElementById("digitalClock").innerHTML = getDayName(today, "us-US") + ", " + time + " " + session + ".";
} catch {
}
return time;
}
// initialize the time function
displayTime();

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,97 @@
// Stealth engine, a dependency for everything above.
// ensures that the js file is loaded
window.stealthEngineLoaded = true;
function stealthEngine(encodedURL) {
// Remember that the EncodedURL argument must be pre-encoded, or encoded before the function is called.
// This function does not encode the argument at all!
// Initialize the variable
let inFrame;
// make sure there isn't a window open already
try {
inFrame = window !== top;
} catch (e) {
inFrame = true;
}
setTimeout(() => {
// Basically, a checklist to make sure that an error won't occur.
// In this if statement, we're checking if an iframe is already being opened, if popups are disabled, and if the user agent IS NOT firefox (firefox sucks, sorry Moz)
if (!inFrame && !navigator.userAgent.includes("Firefox")) {
const popup = open("about:blank", "_blank");
if (!popup || popup.closed) {
alert("StealthEngine was unable to open a popup. (do you have popups disabled?)");
} else {
const doc = popup.document;
const iframe = doc.createElement("iframe");
const style = iframe.style;
popup.onload = () => {
document.getElementById("lpoader").style.display = "none"
document.getElementById('connectorText').textContent = "connecting to service"
setTimeout(() => {
document.getElementById('connectorText').textContent = "connecting to service"
}, 17500);
};
var isClosed = setInterval(function () {
if (popup.closed) {
clearInterval(isClosed);
document.getElementById("lpoader").style.display = "none"
document.getElementById('connectorText').textContent = "connecting to service"
}
}, 1000);
// Favicon attachment
const img = doc.createElement("link");
const arcSrc = doc.createElement("script");
// We attach ARC because it supports us, keeping our arc link there would be greatly appreciated :)
arcSrc.setAttribute("src", "https://arc.io/widget.min.js#BgaWcYfi");
arcSrc.setAttribute("async", "");
doc.head.appendChild(arcSrc);
const link = location.href;
img.rel = "icon";
img.href = ABFavicon || "https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png";
if (localStorage.nogg == "on") {
doc.title = ABTitle || getRandomName();
} else {
doc.title = ABTitle || "Nebula";
}
var currentLink = link.slice(0, link.length - 1);
iframe.src = currentLink + encodedURL;
style.position = "fixed";
style.top = style.bottom = style.left = style.right = 0;
style.border = style.outline = "none";
style.width = style.height = "100%";
doc.body.appendChild(iframe);
doc.head.appendChild(img);
}
}
}, 1500);
}
let tryAbFavi = localStorage.getItem("ABfaviconURL");
let ABFavicon = "";
if (tryAbFavi === null) {
console.warn("ABfaviconURL is null, Defaulting");
ABFavicon = "";
} else if (tryAbFavi == "") {
console.warn("ABfaviconURL is empty, Defaulting");
ABFavicon = "";
} else {
ABFavicon = tryAbFavi;
}
let tryAbTitle = localStorage.getItem("ABtitle");
let ABTitle = "";
if (tryAbTitle === null) {
console.warn("ABtitle is null, Defaulting");
ABTitle = "";
} else if (tryAbTitle == "") {
console.warn("ABtitle is empty, Defaulting");
ABTitle = "";
} else {
ABTitle = tryAbTitle;
}

View file

@ -480,7 +480,7 @@ small {
padding-right: 0.3em; padding-right: 0.3em;
} }
@media only screen and (max-width: 1100px) { @media only screen and (max-width: 1190px) {
#digitalClock { #digitalClock {
display: none; display: none;
} }

View file

@ -39,16 +39,15 @@
<!-- Stylesheets --> <!-- Stylesheets -->
<script src="resources/nebulamain.js"></script> <script src="resources/nebulamain.js"></script>
<link rel="stylesheet" href="style/main.css" /> <script src="resources/nebulaclock.js"></script>
<script src="resources/stealthEngine.js"></script>
<link rel="stylesheet" href="style/main.css">
<!-- Embed --> <!-- Embed -->
<meta name="theme-color" content="#eb6f92" /> <meta name="theme-color" content="#eb6f92">
<meta property="og:title" content="Nebula" /> <meta property="og:title" content="Nebula">
<meta property="og:type" content="website" /> <meta property="og:type" content="website">
<meta <meta property="og:image" content="https://static.nebulacdn.xyz/content/images/nebula_logo_619x619.png">
property="og:image" <meta property="og:description" content="Nebula Web">
content="https://static.nebulacdn.xyz/content/images/nebula_logo_619x619.png"
/>
<meta property="og:description" content="Nebula Web" />
</head> </head>
<body> <body>
<!-- Scripts --> <!-- Scripts -->
@ -377,7 +376,7 @@
/> />
</rect> </rect>
</svg> </svg>
<p id="connecterText" class="connector">connecting to service</p> <p id="connectorText" class="connector"></p>
</div> </div>
</div> </div>
<!-- Stamp --> <!-- Stamp -->
@ -386,11 +385,10 @@
<a class="github" href="https://github.com/NebulaServices/Nebula" <a class="github" href="https://github.com/NebulaServices/Nebula"
>GitHub</a >GitHub</a
> >
<a <a
class="tos" class="tos"
href="#" href="#"
onclick="href = '/service/go/' + __uv$config.encodeUrl('https://static.nebulacdn.xyz/content/other/nebula-privacy-policy/index.html')" onclick='window.href = "/service/go/" + __uv$config.encodeUrl("https://static.nebulacdn.xyz/content/other/nebula-privacy-policy/index.html")'>Privacy</a
>Privacy</a
> >
</div> </div>
</body> </body>