*Update references of .skynet to .lume
This commit is contained in:
parent
d37926dd84
commit
7efd901b97
|
@ -15,9 +15,9 @@ export default class InternalProvider extends BaseProvider {
|
|||
details: OnBeforeRequestDetailsType
|
||||
): Promise<boolean> {
|
||||
return [
|
||||
"http://kernel.skynet/",
|
||||
"http://kernel.skynet/auth.html",
|
||||
"http://kernel.skynet/favicon.ico",
|
||||
"http://kernel.lume/",
|
||||
"http://kernel.lume/auth.html",
|
||||
"http://kernel.lume/favicon.ico",
|
||||
].includes(details.url);
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ export default class InternalProvider extends BaseProvider {
|
|||
): Promise<BlockingResponse | boolean> {
|
||||
// For the kernel, we swallow the entire page. The 'bootloader' content
|
||||
// script will everything that we need.
|
||||
if (details.url === "http://kernel.skynet/") {
|
||||
if (details.url === "http://kernel.lume/") {
|
||||
// Get the filter and swallow any response from the server.
|
||||
let filter = browser.webRequest.filterResponseData(details.requestId);
|
||||
filter.onstart = () => {
|
||||
|
@ -37,7 +37,7 @@ export default class InternalProvider extends BaseProvider {
|
|||
|
||||
// For the favicon, we make a request to a content script that has access
|
||||
// to the favicon.
|
||||
if (details.url === "http://kernel.skynet/favicon.ico") {
|
||||
if (details.url === "http://kernel.lume/favicon.ico") {
|
||||
// Send a message to the kernel requesting an override for the
|
||||
// favicon.ico. The kernel is itself loading this favicon from the
|
||||
// browser, I just wasn't certain how to get binary objects directly to
|
||||
|
@ -68,7 +68,7 @@ export default class InternalProvider extends BaseProvider {
|
|||
|
||||
// For the favicon, we make a request to a content script that has access
|
||||
// to the favicon.
|
||||
if (details.url === "http://kernel.skynet/auth.html") {
|
||||
if (details.url === "http://kernel.lume/auth.html") {
|
||||
// Send a message to the kernel requesting an override for the auth
|
||||
// page. The kernel is itself loading the auth page from the browser, I
|
||||
// just wasn't certain how to get binary objects directly to the
|
||||
|
@ -105,8 +105,8 @@ export default class InternalProvider extends BaseProvider {
|
|||
details: OnHeadersReceivedDetailsType
|
||||
): Promise<OnRequestDetailsType | boolean> {
|
||||
if (
|
||||
details.url === "http://kernel.skynet/" ||
|
||||
details.url === "http://kernel.skynet/auth.html"
|
||||
details.url === "http://kernel.lume/" ||
|
||||
details.url === "http://kernel.lume/auth.html"
|
||||
) {
|
||||
let headers = [
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ export default class InternalProvider extends BaseProvider {
|
|||
}
|
||||
|
||||
// For the favicon, replace the headers with png headers.
|
||||
if (details.url === "http://kernel.skynet/favicon.ico") {
|
||||
if (details.url === "http://kernel.lume/favicon.ico") {
|
||||
let headers = [
|
||||
{
|
||||
name: "content-type",
|
||||
|
@ -133,7 +133,7 @@ export default class InternalProvider extends BaseProvider {
|
|||
|
||||
async handleProxy(details: OnRequestDetailsType): Promise<any> {
|
||||
const hostname = new URL(details.url).hostname;
|
||||
if (hostname === "kernel.skynet") {
|
||||
if (hostname === "kernel.lume") {
|
||||
return requestProxies;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ export function queryKernel(query: any): Promise<any> {
|
|||
if (getKernelIframe().contentWindow !== null) {
|
||||
(getKernelIframe() as any).contentWindow.postMessage(
|
||||
query,
|
||||
"http://kernel.skynet"
|
||||
"http://kernel.lume"
|
||||
);
|
||||
} else {
|
||||
console.error(
|
||||
|
@ -90,7 +90,7 @@ function handleKernelMessage(event: MessageEvent) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (event.origin !== "http://kernel.skynet") {
|
||||
if (event.origin !== "http://kernel.lume") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ function handleBridgeMessage(
|
|||
});
|
||||
data["domain"] = domain;
|
||||
}
|
||||
getKernelIframe().contentWindow!.postMessage(data, "http://kernel.skynet");
|
||||
getKernelIframe().contentWindow!.postMessage(data, "http://kernel.lume");
|
||||
}
|
||||
function bridgeListener(port: any) {
|
||||
let portNonce = getPortsNonce();
|
||||
|
@ -211,7 +211,7 @@ async function boot() {
|
|||
engine.registerContentProvider(new ServerProvider(engine));
|
||||
|
||||
setKernelIframe(document.createElement("iframe"));
|
||||
getKernelIframe().src = "http://kernel.skynet";
|
||||
getKernelIframe().src = "http://kernel.lume";
|
||||
getKernelIframe().onload = init;
|
||||
document.body.appendChild(getKernelIframe());
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ var browser: any; // tsc
|
|||
const defaultKernelResolverLink =
|
||||
"AQDJDoXMJiiEMBxXodQvUV89qtQHsnXWyV1ViQ9M1pMjUg";
|
||||
|
||||
document.title = "kernel.skynet";
|
||||
document.title = "kernel.lume";
|
||||
let header = document.createElement("h1");
|
||||
header.textContent =
|
||||
"Something went wrong! You should not be visiting this page, this page should only be accessed via an invisible iframe.";
|
||||
|
@ -170,7 +170,7 @@ function handleSkynetKernelRequestOverride(event: MessageEvent) {
|
|||
);
|
||||
};
|
||||
|
||||
if (event.data.data.url === "http://kernel.skynet/favicon.ico") {
|
||||
if (event.data.data.url === "http://kernel.lume/favicon.ico") {
|
||||
blockForFavicon.then(() => {
|
||||
let headers = [
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ function handleSkynetKernelRequestOverride(event: MessageEvent) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (event.data.data.url === "http://kernel.skynet/auth.html") {
|
||||
if (event.data.data.url === "http://kernel.lume/auth.html") {
|
||||
blockForAuthPage.then(() => {
|
||||
let headers = [
|
||||
{
|
||||
|
@ -457,21 +457,4 @@ function checkForLoadKernel() {
|
|||
loadKernel();
|
||||
}
|
||||
|
||||
let accessFailedStr =
|
||||
"unable to get access to localStorage, user may need to reduce their privacy settings";
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(document, "requestStorageAccess") &&
|
||||
window.origin === "https://skt.us"
|
||||
) {
|
||||
document
|
||||
.requestStorageAccess()
|
||||
.then(() => {
|
||||
checkForLoadKernel();
|
||||
})
|
||||
.catch((err) => {
|
||||
log(addContextToErr(err, accessFailedStr));
|
||||
sendAuthUpdate();
|
||||
});
|
||||
} else {
|
||||
checkForLoadKernel();
|
||||
}
|
||||
checkForLoadKernel();
|
||||
|
|
|
@ -273,7 +273,7 @@ export default class WebEngine {
|
|||
|
||||
this.navigations.set(this.getNavigationId(details), promise);
|
||||
|
||||
if ("kernel.skynet" === queriedHost) {
|
||||
if ("kernel.lume" === queriedHost) {
|
||||
if (!queriedUrl.includes("://")) {
|
||||
queriedUrl = `http://${queriedUrl}`;
|
||||
}
|
||||
|
|
Reference in New Issue