canvas prep
diff --git a/canvas/index.html b/canvas/index.html
deleted file mode 100644
index 3e56014..0000000
--- a/canvas/index.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <link rel="shortcut icon" href="favicon.png" type="image/png">
- <!--Import Google Icon Font-->
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons+Extended" rel="stylesheet">
- <link type="text/css" rel="stylesheet" href="/fluid.css" media="screen,projection"/>
- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
-<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
-<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
- <!-- CSS
- –––––––––––––––––––––––––––––––––––––––––––––––––– -->
- <!--OpenGraph -->
- <meta property="og:url" content="https://dtps.js.org" />
- <meta property="og:title" content="Power+" />
- <meta property="og:description" content="A redesigned UI for PowerSchool Learning designed for d.tech" />
- <meta property="og:image" content="https://dtps.js.org/dtps.png" />
-
- <meta charset="utf-8">
- <title>Power+ for Canvas</title>
-<meta name="description" content="A redesigned UI for PowerSchool Learning designed for d.tech">
- <meta name="author" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
-</head>
-
-<style>
-</style>
-<body class="auto">
- <style>
- body.dark #mainIMG {
- background-image: url(https://i.imgur.com/zsG1u5S.png);
- }
- body:not(.dark) #mainIMG {
- background-image: url(https://i.imgur.com/8R4bEG0.png);
- }
- </style>
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
- <script type="text/javascript" src="/fluid.js"></script>
- <br /><br /><br /><br /><br /><br />
- <div class="center">
- <h1 style="font-size: 100px; display: inline-block; background: -webkit-linear-gradient(rgb(255, 167, 0), rgb(255, 244, 0)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: bold;">Power+</h1><span style="font-size: 24px; color: gray; font-weight: bold;">for <span style="color: #d74b3b; font-weight: bold;">Canvas</span></span>
- <h5>A redesigned experience for Canvas designed for d.tech</h5>
- <br /></div>
- <div style="text-align: center;">
- <button onclick="fluid.cards('.card.soon');" class="btn"><i class="material-icons">experiment</i> Try it</button>
- <button onclick="window.location.href = 'https://github.com/jottocraft/dtps/blob/master/README.md#power-roadmap';" class="btn"><i class="material-icons">timeline</i> Roadmap</button>
- <div class="card focus container soon close">
- <i onclick="fluid.cards.close('.card.soon')" class="material-icons close">close</i>
- <h3>Use Power+ on Canvas</h3>
- <h5>Step 1: Install Power+</h5>
- <p>If you don't already have Power+ installed, click <a href="https://chrome.google.com/webstore/detail/power%20/pakgdifknldaiglefmpkkgfjndemfapo">here</a> to install it</p>
- <br />
- <h5>Step 2: Opt-in to Power+ for Canvas testing</h5>
- <p>Login to your Canvas account, then click on your profile picture on the sidebar at the left and select Settings. On the settings page, scroll down to Power+ (canary) under the list of feature options and click the slider to enable it.</p>
- <br />
- <h5>Step 3: Use Power+</h5>
- <p>Click the dashboard button in the sidebar, then click Power+ in the sidebar to start using Power+ on Canvas</p>
- </div>
- <br />
- <div id="mainIMG" style="width: 1000px;height: 570px;border-radius: 10px;margin-top: 50px;box-shadow: 0 10px 30px rgba(0, 0, 0, 0.17);margin: 50px auto;background-size: cover;"></div>
- </div>
-
-
-
-</div>
-
-</body>
-</html>
diff --git a/chrome/background.js b/chrome/background.js
new file mode 100644
index 0000000..f63d0bf
--- /dev/null
+++ b/chrome/background.js
@@ -0,0 +1,5 @@
+chrome.runtime.onMessage.addListener(function(message) {
+ if (message.messageName == 'extensionUninstall') {
+ chrome.management.uninstallSelf();
+ }
+});
diff --git a/chrome/chrome.zip b/chrome/chrome.zip
new file mode 100644
index 0000000..6670446
--- /dev/null
+++ b/chrome/chrome.zip
Binary files differ
diff --git a/chrome/communicator.js b/chrome/communicator.js
index 532a24b..2e384de 100644
--- a/chrome/communicator.js
+++ b/chrome/communicator.js
@@ -1,26 +1,38 @@
-if (window.location.pathname.split("/")[3] == "portal") {
-
- $(document).ready(function() {
- var url = 'https://dtps.js.org/init.js'
-if (window.localStorage.devAutoLoad == "true") var url = 'https://dtps.js.org/dev.js'
+$(document).ready(function() {
+console.log("[DTPS Chrome] Automatically loading Project DTPS");
-window.dtpsLoader = 2;
-window.dtpsExtension = true;
+//Canvas Script
+var url = 'https://dtps.js.org/init.js'
+if (window.localStorage.devAutoLoad == "true") var url = (window.localStorage.dtpsLocal == "true" ? window.localStorage.dtpsPath + 'init.js' : 'https://dtps.js.org/init.js')
+
+window.dtpsLoader = 3;
+
document.addEventListener('extensionData', function(e) {
if (e.detail == "extensionStatus") {
document.dispatchEvent(new CustomEvent('extensionData', {
detail: "extensionInstalled"
}));
}
+ if (e.detail == "extensionUninstall") {
+ chrome.runtime.sendMessage({messageName: 'extensionUninstall'});
+ }
});
-if ((window.localStorage.disableAutoLoad == undefined) || (window.localStorage.disableAutoLoad == "true")) {
-jQuery("#global_top_links").append(`<a onclick="javascript:jQuery.getScript('` + url + `');dtpsLoader=2;">Power+` + (window.localStorage.devAutoLoad == "true" ? " (dev)" : "") + `</a>`)
-} else {
-console.log("[DTPS Chrome] Automatically loading Project DTPS");
-$.getScript(url);
-}
- });
-
+
+if ((window.localStorage.disableAutoLoad == undefined) || (window.localStorage.disableAutoLoad == "true")) {
+jQuery("#menu").append(`<li class="ic-app-header__menu-list-item">
+ <a onclick="jQuery.getScript('` + url + `');dtpsLoader=2;" style="cursor: pointer;" class="ic-app-header__menu-list-link">
+ <div class="menu-item-icon-container" aria-hidden="true">
+ <img src="https://dtps.js.org/canvas.png" class="ic-icon-svg">
+
+ </div>
+ <div class="menu-item__text" style="font-size: 14px;">Power+
+ ` + (window.localStorage.devAutoLoad == "true" ? `<div style="background-color: #ec9b06;color: white;font-size: 10px;line-height: 9px;vertical-align: middle;padding: 2px 2.5px;border-radius: 5px;display: inline-block;">dev</div>` : "") + `
+ </div>
+ </a>
+ </li>`)
+} else {
+ $.getScript(url);
}
+});
diff --git a/chrome/manifest.json b/chrome/manifest.json
index 1bb6b91..7d9d88a 100644
--- a/chrome/manifest.json
+++ b/chrome/manifest.json
@@ -2,11 +2,14 @@
"manifest_version": 2,
"name": "Power+",
- "description": "A redesigned UI for PowerSchool Learning",
- "version": "2.0.7",
+ "description": "A redesigned UI for Canvas LMS",
+ "version": "2.1.0",
+ "background": {
+ "scripts": ["background.js"]
+ },
"content_scripts": [
{
- "matches": ["https://dtechhs.learning.powerschool.com/u/*"],
+ "matches": ["https://canvas.instructure.com/*", "https://dtechhs.instructure.com/*"],
"js": ["jquery.min.js", "communicator.js"]
}
],
diff --git a/dev.js b/dev.js
index f8b2f38..1f048e8 100644
--- a/dev.js
+++ b/dev.js
@@ -1,4 +1,4 @@
-window.alert("The Power+ dev channel is offline. Visit dtps.js.org/roadmap for more information.")
+window.alert("The Power+ dev channel is offline")
if (window.localStorage.devAutoLoad == "true") {
window.localStorage.devAutoLoad = "false"
window.location.reload();
diff --git a/index.html b/index.html
index 828a896..d088014 100644
--- a/index.html
+++ b/index.html
@@ -61,32 +61,30 @@
}
.titlebar img {
vertical-align: middle;
- width: 24px;
height: 24px;
}
+ .banner {
+ margin: 10px 0px;
+ text-align: center;
+ border-radius: 20px;
+ padding: 2px 20px;
+ background-color: #c14d3c;
+ font-size: 16px;
+ line-height: 30px;
+ vertical-align: middle;
+ display: inline-block;
+ }
</style>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="fluid.js"></script>
- <script>
- $(document).ready(function() {
- if (window.localStorage.dtpsRefresh) {
- $("#login").html(`<i class="material-icons">open_in_new</i> Open`)
- }
- if (window.location.href.includes("?logout=true")) {
- window.history.replaceState(null, null, window.location.pathname);
- $("#login").html(`<i style="font-family: 'Material Icons Extended'" class="material-icons">lock</i> Logged out`)
- }
- })
- </script>
<div style="padding: 0px 20px;" class="titlebar">
<img style="width: auto; height: 36px; margin-bottom: -6px; margin-right: 10px;" src="https://dtps.js.org/outline.png" />
<h3>Power+</h3>
<div onclick="window.location.href = 'https://chrome.google.com/webstore/detail/power%20/pakgdifknldaiglefmpkkgfjndemfapo';"><i class="material-icons">cloud_download</i> Install</div>
- <div onclick="window.location.href='/canvas'"><img src="https://i.imgur.com/g36oHzm.png" /> Power+ for Canvas</div>
<div onclick="window.location.href = 'https://status.jottocraft.com';"><i class="material-icons">notifications</i> Status</div>
- <div id="login" onclick="window.location.href = '/app';"><i style="font-family: 'Material Icons Extended'" class="material-icons">lock_outline</i> Login</div>
</div>
- <div style="text-align: center; margin-top: calc(50vh - 331px);">
+ <div style="text-align: center; margin-top: calc(50vh - 381px);">
+ <div style="margin-bottom: 50px;" class="banner"><i style="vertical-align: middle; margin-right: 5px;" class="material-icons">error_outline</i> Power+ will no longer support PowerSchool Learning starting July 1st, 2019</div>
<div id="mainIMG" style="width: 798.44px;height: 511px;border-radius: 10px;margin-top: 50px;box-shadow: 0 10px 30px rgba(0, 0, 0, 0.17);margin: 50px auto;background-size: cover;"></div>
</div>
diff --git a/mkdocs.yml b/mkdocs.yml
deleted file mode 100644
index 6ab5ef1..0000000
--- a/mkdocs.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-site_name: Project DTPS
-site_url: https://dtps.js.org
-site_description: PowerSchool LMS improvements project
-site_author: jottocraft
-repo_url: https://github.com/jottocraft/dtps/
-theme:
- name: readthedocs
- highlightjs: true
diff --git a/roadmap/index.html b/roadmap/index.html
deleted file mode 100644
index 8eb6c12..0000000
--- a/roadmap/index.html
+++ /dev/null
@@ -1 +0,0 @@
-<script>window.location.href = "https://github.com/jottocraft/dtps#power-roadmap"</script>
diff --git a/canvas.png b/whiteOutline.png
similarity index 100%
rename from canvas.png
rename to whiteOutline.png
Binary files differ