Commit 3020612f authored by Marco Kellershoff's avatar Marco Kellershoff 🤸

Change domain to newtab.gorilla.moe

Also add offline support.
parent dd47eda7
......@@ -42,7 +42,7 @@ html, body {
### Custom Javascript
```javascript
var html = `<link rel="stylesheet" href="//cdn.walialu.com/font-linux/assets/font-linux.css?v=201711161233" />
var html = `<link rel="stylesheet" href="//cdn.gorilla.moe/font-linux/assets/font-linux.css?v=201711161233" />
<div class="container">
<span class="fl-archlinux fl-10x">
</span>
......
......@@ -4,7 +4,7 @@
"name": "Super Evil New Tab",
"short_name": "SENT",
"author":"Marco Kellershoff",
"version": "6.0.3",
"version": "6.1.0",
"description": "Fixes the super evil new tab page.",
"options_page": "options.html",
"permissions": [
......@@ -21,7 +21,7 @@
"content_scripts": [{
"all_frames": true,
"js": ["remote.newtab.js"],
"matches": ["https://newtab.walialu.com/*"]
"matches": ["https://newtab.gorilla.moe/*"]
}]
}
......@@ -3,7 +3,7 @@
let getOption = (key, cb) => {
var typeOfKey;
typeOfKey = typeof key;
if (typeOfKey === 'string') {
if (typeOfKey === "string") {
key = [key];
}
chrome.storage.sync.get(key, function(res) {
......@@ -11,10 +11,10 @@
});
};
let getFrame = () => {
return document.getElementById('newtabframe');
return document.getElementById("newtabframe");
};
let getRes = () => {
return {w: window.innerWidth, h: window.innerHeight};
return { w: window.innerWidth, h: window.innerHeight };
};
let maximizeFrame = () => {
let frm = getFrame();
......
......@@ -3,7 +3,7 @@
let getOption = (key, cb) => {
var typeOfKey;
typeOfKey = typeof key;
if (typeOfKey === 'string') {
if (typeOfKey === "string") {
key = [key];
}
chrome.storage.sync.get(key, function(res) {
......@@ -11,7 +11,7 @@
});
};
let getUrl = () => {
return "https://newtab.walialu.com/";
return "https://newtab.gorilla.moe/";
};
let boot = () => {
parent.document.getElementById("newtabframe").src = getUrl();
......
......@@ -3,7 +3,7 @@
let getOption = function(key, cb) {
var typeOfKey;
typeOfKey = typeof key;
if (typeOfKey === 'string') {
if (typeOfKey === "string") {
key = [key];
}
chrome.storage.sync.get(key, function(res) {
......@@ -13,16 +13,16 @@
let boot = function() {
let css = document.createElement("style");
let js = document.createElement("script");
getOption("css", (result) => {
css.innerHTML = result.css;
document.querySelector("head").appendChild(css);
getOption("css", result => {
css.innerHTML = result.css;
document.querySelector("head").appendChild(css);
});
getOption("html", (result) => {
getOption("html", result => {
if (result.html && result.html.length)
document.body.innerHTML = result.html;
getOption("javascript", (result) => {
js.innerHTML = result.javascript;
document.querySelector("head").appendChild(js);
document.body.innerHTML = result.html;
getOption("javascript", result => {
js.innerHTML = result.javascript;
document.querySelector("head").appendChild(js);
});
});
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment