adding the new FAQs page

This commit is contained in:
Jeremy Schomery 2017-03-11 12:56:24 +03:30
parent b721f01c5f
commit 74cbefc427
2 changed files with 17 additions and 6 deletions

View File

@ -179,9 +179,20 @@ getCodeMirrorThemes(function(themes) {
codeMirrorThemes = themes; codeMirrorThemes = themes;
}); });
// to-do, user-feedback (https://github.com/schomery/stylish-chrome/issues/22#issuecomment-279936160) // do not use prefs.get('version', null) as it might not yet be available
(function (oV, nV) { chrome.storage.local.get('version', prefs => {
if (oV !== nV) { // Open FAQs page once after installation to guide new users,
prefs.set('version', nV); // https://github.com/schomery/stylish-chrome/issues/22#issuecomment-279936160
if (!prefs.version) {
let version = chrome.runtime.getManifest().version;
chrome.storage.local.set({
version
}, () => {
window.setTimeout(() => {
chrome.tabs.create({
url: 'http://add0n.com/stylus.html?version=' + version + '&type=install'
});
}, 3000);
})
} }
})(prefs.get('version', null), chrome.runtime.getManifest().version) });

View File

@ -2,7 +2,7 @@
"name": "Stylus", "name": "Stylus",
"version": "1.0.3", "version": "1.0.3",
"description": "__MSG_description__", "description": "__MSG_description__",
"homepage_url": "https://github.com/schomery/stylish-chrome", "homepage_url": "http://add0n.com/stylus.html",
"manifest_version": 2, "manifest_version": 2,
"icons": { "icons": {
"16": "16.png", "16": "16.png",