[chrome-gnome-shell] Replaced extensions website URL with constant
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chrome-gnome-shell] Replaced extensions website URL with constant
- Date: Tue, 9 Aug 2016 08:54:08 +0000 (UTC)
commit ba446711ae7412a10bda75a6b4b666340f9d8bde
Author: Yuri Konotopov <ykonotopov gmail com>
Date: Tue Aug 9 11:53:00 2016 +0300
Replaced extensions website URL with constant
extension/extension.js | 4 ++--
extension/include/constants.js | 3 ++-
extension/include/update.js | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/extension/extension.js b/extension/extension.js
index 217a783..a21fe51 100644
--- a/extension/extension.js
+++ b/extension/extension.js
@@ -26,7 +26,7 @@ chrome.runtime.onInstalled.addListener(function(details) {
});
chrome.runtime.onMessageExternal.addListener(function (request, sender, sendResponse) {
- if (sender.url.startsWith('https://extensions.gnome.org/'))
+ if (sender.url.startsWith(EXTENSIONS_WEBSITE))
{
if (request && request.execute)
{
@@ -72,7 +72,7 @@ port.onMessage.addListener(function (message) {
if (message && message.signal && ["ExtensionStatusChanged",
"org.gnome.Shell"].indexOf(message.signal) !== -1)
{
chrome.tabs.query({
- url: 'https://extensions.gnome.org/*'
+ url: EXTENSIONS_WEBSITE + '*'
},
function (tabs) {
for (k in tabs)
diff --git a/extension/include/constants.js b/extension/include/constants.js
index 42d71af..34e9054 100644
--- a/extension/include/constants.js
+++ b/extension/include/constants.js
@@ -21,7 +21,8 @@ MESSAGE_NEXT_UPDATE_CHANGED = 'gs-next-update-changed';
NATIVE_HOST = 'io.github.ne0sight.gs_chrome_connector';
-UPDATE_URL = 'https://extensions.gnome.org/update-info/';
+EXTENSIONS_WEBSITE = 'https://extensions.gnome.org/';
+UPDATE_URL = EXTENSIONS_WEBSITE + 'update-info/';
DEFAULT_OPTIONS = {
showReleaseNotes: true,
diff --git a/extension/include/update.js b/extension/include/update.js
index d1f474e..b3a38d0 100644
--- a/extension/include/update.js
+++ b/extension/include/update.js
@@ -167,7 +167,7 @@ GSC.update = (function($) {
if (notificationId === NOTIFICATION_UPDATE_AVAILABLE)
{
chrome.tabs.create({
- url: 'https://extensions.gnome.org/local/',
+ url: EXTENSIONS_WEBSITE + 'local/',
active: true
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]