-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c6a59f
commit 6fcd758
Showing
15 changed files
with
144 additions
and
10 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 |
---|---|---|
@@ -1 +1,3 @@ | ||
*.pem | ||
*.pem | ||
*.lnk | ||
*.url |
Binary file not shown.
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,4 +1,5 @@ | ||
# chromium-web-store | ||
Allows adding extensions from chrome web store on unsupported chromium derivatives like ungoogled-chromium. | ||
You can click the badge to check for updates to any web store extensions, it will also check automatically when you first start chromium. | ||
If you wish to install the extensions directly instead of just downloading them, you must change the flag `chrome://flags/#extension-mime-request-handling` to `Always prompt for install`. | ||
To install this extension, drag and drop the .crx into your `chrome://extensions` page. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Web Store Updates</title> | ||
<script src="popup.js"></script> | ||
</head> | ||
<body style="white-space: nowrap;"> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
chrome.management.getAll(function (e) { | ||
var chromeVersion = /Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1]; | ||
var updateUrl = 'https://clients2.google.com/service/update2/crx?response=updatecheck&acceptformat=crx2,crx3&prodversion='+chromeVersion; | ||
var installed_versions = {}; | ||
e.forEach(function(ex) { | ||
updateUrl += '&x=id%3D'+ex.id+'%26uc'; | ||
installed_versions[ex.id] = ex; | ||
}); | ||
document.body.innerHTML = '<h3>Checking for updates...</h3>'; | ||
var resulthtml = '<h3>Available Updates:</h3>'; | ||
var xhttp = new XMLHttpRequest(); | ||
xhttp.onreadystatechange = function() { | ||
if (this.readyState == 4) { | ||
if (this.status == 200) { | ||
xmlDoc = this.responseXML; | ||
var updates = xmlDoc.getElementsByTagName('app'); | ||
console.log(updates); | ||
var updatecount = 0; | ||
for (var i=0; i < updates.length; i++) { | ||
if (updateCheck = updates[i].firstChild) { | ||
var appid = updates[i].getAttribute('appid'); | ||
|
||
if (updateCheck.getAttribute('version') && installed_versions[appid].version != updateCheck.getAttribute('version')) | ||
{ | ||
resulthtml+='<div display="inline">'; | ||
resulthtml+='<a href="https://chrome.google.com/webstore/detail/'+appid+'" target="_blank">'+installed_versions[appid].name+' ('+installed_versions[appid].version+' => '+updateCheck.getAttribute('version')+')</a>'; | ||
resulthtml+='</div>'; | ||
updatecount++; | ||
} | ||
} | ||
} | ||
if (updatecount > 0) | ||
{ | ||
chrome.browserAction.setBadgeText({text: ''+updatecount}); | ||
document.body.innerHTML = resulthtml; | ||
} | ||
else { | ||
chrome.browserAction.setBadgeText({text: ''}); | ||
document.body.innerHTML = '<h3>All web store extensions up to date!</h3>'; | ||
} | ||
} | ||
else { | ||
chrome.browserAction.setBadgeText({text: "?"}); | ||
document.body.innerHTML = '<h3>Update check failed!</h3>'; | ||
} | ||
} | ||
}; | ||
xhttp.open("GET", updateUrl, true); | ||
xhttp.send(); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
updateBadge(); | ||
|
||
function updateBadge (modified_ext_id = null) { | ||
chrome.management.getAll(function (e) { | ||
var chromeVersion = /Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1]; | ||
var updateUrl = 'https://clients2.google.com/service/update2/crx?response=updatecheck&acceptformat=crx2,crx3&prodversion='+chromeVersion; | ||
var installed_versions = {}; | ||
chrome.browserAction.setBadgeBackgroundColor({color:'#F00'}); | ||
e.forEach(function(ex) { | ||
updateUrl += '&x=id%3D'+ex.id+'%26uc'; | ||
installed_versions[ex.id] = ex; | ||
}); | ||
var xhttp = new XMLHttpRequest(); | ||
xhttp.onreadystatechange = function() { | ||
if (this.readyState == 4) { | ||
if (this.status == 200) { | ||
xmlDoc = this.responseXML; | ||
var updates = xmlDoc.getElementsByTagName('app'); | ||
var updatecount = 0; | ||
for (var i=0; i < updates.length; i++) { | ||
if (updateCheck = updates[i].firstChild) { | ||
var appid = updates[i].getAttribute('appid'); | ||
if (appid != modified_ext_id && updateCheck.getAttribute('version') && installed_versions[appid].version != updateCheck.getAttribute('version')) | ||
{ | ||
updatecount++; | ||
} | ||
} | ||
} | ||
if (updatecount > 0) | ||
chrome.browserAction.setBadgeText({text: ''+updatecount}); | ||
else | ||
chrome.browserAction.setBadgeText({text: ''}); | ||
} | ||
else { | ||
chrome.browserAction.setBadgeText({text: "?"}); | ||
} | ||
} | ||
}; | ||
xhttp.open("GET", updateUrl, true); | ||
xhttp.send(); | ||
}); | ||
}; | ||
|
||
chrome.management.onInstalled.addListener(function(ext) { | ||
updateBadge(ext.id); | ||
}); | ||
|
||
chrome.management.onUninstalled.addListener(function(ext) { | ||
updateBadge(ext.id); | ||
}); |
File renamed without changes.
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,6 +1,6 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'> | ||
<app appid='ocaahdebbfolfmndjeplogmgcagdmblk'> | ||
<updatecheck codebase='https://github.com/NeverDecaf/chromium-web-store/releases/latest/download/Chromium.Web.Store.crx' version='0.3' /> | ||
<updatecheck codebase='https://github.com/NeverDecaf/chromium-web-store/releases/latest/download/Chromium.Web.Store.crx' version='0.4' /> | ||
</app> | ||
</gupdate> |