Bump versions and move assets host to dtps.jottocraft.com
Change-Id: I47f16c8290542702eb2f4201a653fa8f1ba7f0f6
Reviewed-on: https://src.jottocraft.com/c/dtps/+/139
Reviewed-by: spike <[email protected]>
diff --git a/chrome/loader.js b/chrome/loader.js
index 89d2350..e62dfa6 100644
--- a/chrome/loader.js
+++ b/chrome/loader.js
@@ -40,7 +40,7 @@
if (dtpsHeadLoaded) return;
dtpsHeadLoaded = true;
node.insertAdjacentHTML("afterbegin", /*html*/`
- <link dtps="true" rel="shortcut icon" href="https://powerplus.app/favicon.png" type="image/png">
+ <link dtps="true" rel="shortcut icon" href="https://dtps.jottocraft.com/favicon.png" type="image/png">
<meta dtps="true" name="viewport" content="width=device-width, initial-scale=1">
<meta dtps="true" charset="utf-8">
<title dtps="true">Power+</title>
@@ -93,7 +93,7 @@
if (document.body) injectDTPSLoaderBody(document.body);
//Get Power+ base URL
- var baseURL = "https://powerplus.app";
+ var baseURL = "https://dtps.jottocraft.com";
if (window.localStorage.dtpsLoaderPref == "local") {
baseURL = "http://localhost:2750";
}
diff --git a/chrome/manifest.json b/chrome/manifest.json
index 1b8e191..7e80db2 100644
--- a/chrome/manifest.json
+++ b/chrome/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Power+",
"description": "A better UI for Canvas LMS",
- "version": "3.3.1",
+ "version": "3.4.0",
"content_scripts": [
{
"run_at": "document_start",
diff --git a/init.js b/init.js
index 3d5acb7..083bc74 100644
--- a/init.js
+++ b/init.js
@@ -6,7 +6,7 @@
* @license MIT
*/
-window.dtpsBaseURL = "https://powerplus.app";
+window.dtpsBaseURL = "https://dtps.jottocraft.com";
//Load Canvas LMS script
jQuery.getScript(window.dtpsBaseURL + "/scripts/lms/canvas.js");
diff --git a/scripts/core.js b/scripts/core.js
index f528850..952034d 100644
--- a/scripts/core.js
+++ b/scripts/core.js
@@ -10,6 +10,11 @@
//Make sure DTPS isn't already loading
if (typeof dtps !== "undefined") throw new Error("Error: DTPS is already loading");
+//Handle internal resource URL migration to dtps.jottocraft.com
+if (window.dtpsBaseURL === "https://powerplus.app") {
+ window.dtpsBaseURL = "https://dtps.jottocraft.com";
+}
+
/**
* Global DTPS object
* All global DTPS functions and variables are stored in this object
@@ -36,12 +41,12 @@
* @property {boolean} searchScrollListener True if the search scroll listener has been added
*/
var dtps = {
- ver: 3_09_2,
- readableVer: "v3.9.2",
- env: new URL(window.dtpsBaseURL || "https://powerplus.app").hostname == "localhost" ? "dev" : "prod",
+ ver: 3_10_0,
+ readableVer: "v3.10.0",
+ env: new URL(window.dtpsBaseURL || "https://dtps.jottocraft.com").hostname == "localhost" ? "dev" : "prod",
classes: [],
- baseURL: window.dtpsBaseURL || "https://powerplus.app",
- unstable: window.dtpsBaseURL !== "https://powerplus.app",
+ baseURL: window.dtpsBaseURL || "https://dtps.jottocraft.com",
+ unstable: window.dtpsBaseURL !== "https://dtps.jottocraft.com",
gradebookExpanded: false,
reloadPending: false,
updates: [],
@@ -1653,7 +1658,7 @@
<h4 id="dtpsAboutName" style="font-weight: bold; font-size: 32px; margin-bottom: 0px; user-select: none;">Power+</h4>
<div style="font-size: 16px; margin-top: 5px;">
${dtps.readableVer}
- <div style="display: inline-block;margin: 0px 5px;font-size: 12px;">${baseHost !== "powerplus.app" ? `(from ${baseHost})` : ""}</div>
+ <div style="display: inline-block;margin: 0px 5px;font-size: 12px;">${baseHost !== "dtps.jottocraft.com" ? `(from ${baseHost})` : ""}</div>
</div>
</div>
diff --git a/scripts/lms/demo.js b/scripts/lms/demo.js
index a10808e..5cba3c0 100644
--- a/scripts/lms/demo.js
+++ b/scripts/lms/demo.js
@@ -15,7 +15,7 @@
shortName: "Demo",
description: "All content in this LMS is not real and is for demonstration purposes only",
url: "https://powerplus.app",
- logo: "https://powerplus.app/logo.png",
+ logo: "https://dtps.jottocraft.com/logo.png",
source: "https://src.jottocraft.com/browser/dtps/+/refs/heads/main/scripts/lms/demo.js",
isDemoLMS: true
};
@@ -26,7 +26,7 @@
resolve({
name: "Demo User",
id: "1",
- photoURL: "https://powerplus.app/logo.png"
+ photoURL: "https://dtps.jottocraft.com/logo.png"
});
})
}
@@ -44,7 +44,7 @@
teacher: {
name: "Demo Teacher",
id: "2",
- photoURL: "https://powerplus.app/logo.png"
+ photoURL: "https://dtps.jottocraft.com/logo.png"
}
};
@@ -278,7 +278,7 @@
author: {
name: "Demo Teacher",
id: "2",
- photoURL: "https://powerplus.app/logo.png"
+ photoURL: "https://dtps.jottocraft.com/logo.png"
}
}
]
@@ -309,7 +309,7 @@
author: {
name: "Demo Teacher",
id: "2",
- photoURL: "https://powerplus.app/logo.png"
+ photoURL: "https://dtps.jottocraft.com/logo.png"
}
});
})