This repository has been archived by the owner on Nov 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from swashapp/NewFeatures
New features
- Loading branch information
Showing
104 changed files
with
27,181 additions
and
20,355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ web-ext-artifacts/ | |
js/streamConfig.js | ||
js/configs/streamConfig.json | ||
|
||
/.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
{ | ||
"applications": { | ||
"gecko": { | ||
"id": "[email protected]" | ||
} | ||
}, | ||
|
||
"background": { | ||
"page": "background.html" | ||
}, | ||
|
||
"browser_action": { | ||
"browser_style": false, | ||
"default_icon": { | ||
|
@@ -17,7 +11,7 @@ | |
}, | ||
"default_title": "Swash" | ||
}, | ||
|
||
"description": "Swash is a Streamr Community Product that collects information about users browsing activities", | ||
|
||
"icons": { | ||
|
@@ -29,12 +23,12 @@ | |
"manifest_version": 2, | ||
|
||
"name": "Swash", | ||
|
||
"homepage_url": "https://swashapp.io/", | ||
|
||
"permissions": ["clipboardRead","storage","bookmarks", "tabs", "webRequest", "<all_urls>", "webRequestBlocking", "downloads"], | ||
|
||
"content_security_policy": "script-src 'self'; object-src 'self';", | ||
|
||
"version": "1.1.5" | ||
"version": "1.1.6" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,53 @@ | ||
var browserUtils = (function() { | ||
function getUserAgent() | ||
{ | ||
if(typeof browser.runtime.getBrowserInfo === "function") | ||
return browser.runtime.getBrowserInfo(); | ||
return navigator.userAgent; | ||
} | ||
|
||
function getAllInstalledPlugins() | ||
{ | ||
/*return browser.management.getAll();*/ | ||
} | ||
|
||
function getBrowserLanguage() | ||
{ | ||
return navigator.language; | ||
} | ||
|
||
async function getPlatformInfo() | ||
{ | ||
if(navigator.platform && navigator.platform.startsWith("Win")) | ||
return {os: 'win'}; | ||
let platformInfoPromise = browser.runtime.getPlatformInfo(); | ||
return platformInfoPromise.then((platformInfo) => { | ||
return platformInfo; | ||
}).catch((error) => { | ||
return {os: 'android'}; | ||
}) | ||
} | ||
|
||
async function isMobileDevice() { | ||
let os = (await getPlatformInfo()).os; | ||
if(os === 'android') | ||
return true; | ||
return false; | ||
} | ||
|
||
async function getProxyStatus() { | ||
/* | ||
let proxySetting = await browser.proxy.settings.get({}); | ||
return {httpProxyAll: proxySetting.value.httpProxyAll, proxyDNS: proxySetting.value.proxyDNS, proxyMode: proxySetting.value.mode}; | ||
*/ | ||
} | ||
|
||
function getVersion(){ | ||
return browser.runtime.getManifest().version; | ||
} | ||
|
||
async function getScreenshot() { | ||
let img = ""; | ||
if(typeof browser.tabs.captureTab === "function") | ||
img = await browser.tabs.captureTab(); | ||
return img; | ||
} | ||
return { | ||
getUserAgent, | ||
getAllInstalledPlugins, | ||
getBrowserLanguage, | ||
getPlatformInfo, | ||
getProxyStatus, | ||
getVersion, | ||
getScreenshot, | ||
isMobileDevice | ||
}; | ||
}()) | ||
|
||
var browserUtils = (function() { | ||
function getUserAgent() | ||
{ | ||
if(typeof browser.runtime.getBrowserInfo === "function") | ||
return browser.runtime.getBrowserInfo(); | ||
return navigator.userAgent; | ||
} | ||
|
||
function getAllInstalledPlugins() | ||
{ | ||
/*return browser.management.getAll();*/ | ||
} | ||
|
||
function getBrowserLanguage() | ||
{ | ||
return navigator.language; | ||
} | ||
|
||
async function getPlatformInfo() | ||
{ | ||
if(navigator.platform && navigator.platform.startsWith("Win")) | ||
return {os: 'win'}; | ||
let platformInfoPromise = browser.runtime.getPlatformInfo(); | ||
return platformInfoPromise.then((platformInfo) => { | ||
return platformInfo; | ||
}).catch((error) => { | ||
return {os: 'android'}; | ||
}) | ||
} | ||
|
||
async function isMobileDevice() { | ||
let os = (await getPlatformInfo()).os; | ||
if(os === 'android') | ||
return true; | ||
return false; | ||
} | ||
|
||
|
||
function getVersion(){ | ||
return browser.runtime.getManifest().version; | ||
} | ||
|
||
return { | ||
getUserAgent, | ||
getAllInstalledPlugins, | ||
getBrowserLanguage, | ||
getPlatformInfo, | ||
getVersion, | ||
isMobileDevice | ||
}; | ||
}()) | ||
|
||
export {browserUtils} |
Oops, something went wrong.