Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adapted to new API in dev 19.0.1049.3
  • Loading branch information
Benjamin Bojko committed Feb 24, 2012
1 parent d303e94 commit f817adf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/clear-cache-update.xml
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='phhnmfkcbhdhikdlencmfaeocifheedh'>
<updatecheck codebase='https://github.com/downloads/bigspaceship/Clear-Cache-Extension/clear-cache-0.2.1.crx' version='0.2.1' />
<updatecheck codebase='https://github.com/downloads/bigspaceship/Clear-Cache-Extension/clear-cache-0.2.2.crx' version='0.2.2' />
</app>
</gupdate>
Binary file modified bin/clear-cache.crx
Binary file not shown.
12 changes: 11 additions & 1 deletion src/js/backgroundpage.js
Expand Up @@ -24,8 +24,18 @@
removeCookies( cookieSettings.filters, cookieSettings.inclusive );
}

// new API since Chrome Dev 19.0.1049.3
if( chrome.experimental['browsingData'] && chrome.experimental['browsingData']['removeAppcache'] ){
chrome.experimental.browsingData.remove( {'since':timeperiod}, dataToRemove, function(){
startTimeout(function(){
chrome.browserAction.setBadgeText({text:""});
chrome.browserAction.setPopup({popup:""});
_iconAnimation.fadeOut();
}, 500 );
});

// new API since Chrome Dev 19.0.1041.0
if( chrome.experimental['browsingData'] ){
} else if( chrome.experimental['browsingData'] ){
chrome.experimental.browsingData.remove( timeperiod, dataToRemove, function(){
startTimeout(function(){
chrome.browserAction.setBadgeText({text:""});
Expand Down
4 changes: 2 additions & 2 deletions src/manifest.json
@@ -1,6 +1,6 @@
{
"name": "Clear Cache",
"version": "0.2.1",
"version": "0.2.2",
"update_url": "https://raw.github.com/bigspaceship/Clear-Cache-Extension/master/bin/clear-cache-update.xml",
"icons": {
"16":"img/icon_16.png",
Expand All @@ -14,5 +14,5 @@
"default_title": "Clear Cache"
},
"options_page": "options.html",
"permissions": ["clear","experimental", "cookies", "<all_urls>"]
"permissions": ["clear", "browsingData", "experimental", "cookies", "<all_urls>"]
}

0 comments on commit f817adf

Please sign in to comment.