Skip to content

Commit

Permalink
open update page on update
Browse files Browse the repository at this point in the history
  • Loading branch information
demetrios-koziris committed Jan 3, 2017
1 parent 2326a33 commit 65f9f19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ chrome.runtime.onInstalled.addListener(function (details) {
let currentVersion = chrome.runtime.getManifest().version;

if (details.reason === "install") {
console.log("Installed McGill Enhanced version " + currentVersion);
chrome.tabs.create({url: "https://demetrios-koziris.github.io/McGillEnhanced"}, function (tab) {
console.log("Installed McGill Enhanced version " + currentVersion);
console.log("New tab launched with https://demetrios-koziris.github.io/McGillEnhanced");
});
}
else if (details.reason === "update") {
let previousVersion = details.previousVersion;
console.log("Updated McGill Enhanced from version " + previousVersion + " to version " + currentVersion);
chrome.tabs.create({url: "https://demetrios-koziris.github.io/McGillEnhanced/3.0.32"}, function (tab) {
console.log("New tab launched with https://demetrios-koziris.github.io/McGillEnhanced/3.0.32");
});
}

chrome.runtime.onUpdateAvailable.addListener(function(details) {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "McGill Enhanced",
"author": "Demetrios Koziris",
"manifest_version": 2,
"version": "3.0.31",
"version": "3.0.32",
"description": "Enhance the functionality of McGill.ca",
"permissions" : [
"declarativeContent",
Expand Down

0 comments on commit 65f9f19

Please sign in to comment.