-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Add ability to clear cache via the extension icon
Feature: Implement #36 and enable by default Feature: Implement #26 and disable by default TODO: Implement UI for #26 and #36
- Loading branch information
1 parent
03fe460
commit 8883bd5
Showing
9 changed files
with
172 additions
and
92 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
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,3 +1,11 @@ | ||
|
||
/* eslint no-console: "off" */ | ||
console.log('Hi'); | ||
document.getElementById('clearCache').addEventListener("click", function() { | ||
chrome.storage.sync.get(null, function(settings) { | ||
settings._cacheSalt = btoa(Math.random()); | ||
|
||
chrome.storage.sync.set(settings, () => { | ||
chrome.tabs.reload(); | ||
window.close(); | ||
}); | ||
}); | ||
}); |
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
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,106 +1,114 @@ | ||
|
||
var HangarXPLOR = HangarXPLOR || {}; | ||
|
||
HangarXPLOR.Filter = function(list, filter) | ||
{ | ||
HangarXPLOR.Filter = function (list, filter) { | ||
switch (filter) { | ||
case "HasLTI": | ||
list = $.grep(list, function(item) { return item.hasLTI; }); | ||
list = $.grep(list, function (item) { return item.hasLTI }); | ||
break; | ||
case "!HasLTI": | ||
list = $.grep(list, function(item) { return !item.hasLTI; }); | ||
list = $.grep(list, function (item) { return !item.hasLTI }); | ||
break; | ||
case "IsGiftable": | ||
list = $.grep(list, function(item) { return item.isGiftable; }); | ||
list = $.grep(list, function (item) { return item.isGiftable }); | ||
break; | ||
case "!IsGiftable": | ||
list = $.grep(list, function(item) { return !item.isGiftable; }); | ||
list = $.grep(list, function (item) { return !item.isGiftable }); | ||
break; | ||
case "IsShip": | ||
list = $.grep(list, function(item) { return item.isShip && !item.isPackage; }); | ||
list = $.grep(list, function (item) { return item.isShip && !item.isPackage }); | ||
break; | ||
case "HasShip": | ||
list = $.grep(list, function(item) { return item.hasShip; }); | ||
list = $.grep(list, function (item) { return item.hasShip }); | ||
break; | ||
case "IsNameable": | ||
list = $.grep(list, function (item) { return item.isNameable }); | ||
break; | ||
case "HasNickname": | ||
list = $.grep(list, function (item) { return item.hasNickname }); | ||
break; | ||
case "!HasNickname": | ||
list = $.grep(list, function (item) { return !item.hasNickname }); | ||
break; | ||
case "IsPackage": | ||
list = $.grep(list, function(item) { return item.isPackage; }); | ||
list = $.grep(list, function (item) { return item.isPackage }); | ||
break; | ||
case "!IsPackage": | ||
list = $.grep(list, function(item) { return !item.isPackage && item.hasShip; }); | ||
list = $.grep(list, function (item) { return !item.isPackage && item.hasShip }); | ||
break; | ||
case "IsWarbond": | ||
list = $.grep(list, function(item) { return item.isWarbond && (item.hasShip || item.isUpgrade); }); | ||
list = $.grep(list, function (item) { return item.isWarbond && (item.hasShip || item.isUpgrade) }); | ||
break; | ||
case "!IsWarbond": | ||
list = $.grep(list, function(item) { return !item.isWarbond && (item.hasShip || item.isUpgrade); }); | ||
list = $.grep(list, function (item) { return !item.isWarbond && (item.hasShip || item.isUpgrade) }); | ||
break; | ||
case "IsCombo": | ||
list = $.grep(list, function(item) { return item.isCombo; }); | ||
list = $.grep(list, function (item) { return item.isCombo }); | ||
break; | ||
case "IsUpgrade": | ||
list = $.grep(list, function(item) { return item.isUpgrade; }); | ||
list = $.grep(list, function (item) { return item.isUpgrade }); | ||
break; | ||
case "IsUpgraded": | ||
list = $.grep(list, function(item) { return item.isUpgraded; }); | ||
list = $.grep(list, function (item) { return item.isUpgraded }); | ||
break; | ||
case "!IsUpgraded": | ||
list = $.grep(list, function(item) { return !item.isUpgraded; }); | ||
list = $.grep(list, function (item) { return !item.isUpgraded }); | ||
break; | ||
case "IsAddOn": | ||
list = $.grep(list, function(item) { return item.isAddOn; }); | ||
list = $.grep(list, function (item) { return item.isAddOn }); | ||
break; | ||
case "IsPaint": | ||
list = $.grep(list, function(item) { return item.isPaint; }); | ||
list = $.grep(list, function (item) { return item.isPaint }); | ||
break; | ||
case "IsExtra": | ||
list = $.grep(list, function(item) { return item.isAddOn || item.isUpgrade; }); | ||
list = $.grep(list, function (item) { return item.isAddOn || item.isUpgrade }); | ||
break; | ||
case "IsFlair": | ||
list = $.grep(list, function(item) { return item.isFlair; }); | ||
list = $.grep(list, function (item) { return item.isFlair }); | ||
break; | ||
case "HasValue": | ||
list = $.grep(list, function(item) { return item.hasValue; }); | ||
list = $.grep(list, function (item) { return item.hasValue }); | ||
break; | ||
case "!HasValue": | ||
list = $.grep(list, function(item) { return !item.hasValue; }); | ||
list = $.grep(list, function (item) { return !item.hasValue }); | ||
break; | ||
case "IsMeltable": | ||
list = $.grep(list, function(item) { return item.isMeltable; }); | ||
list = $.grep(list, function (item) { return item.isMeltable }); | ||
break; | ||
case "!IsMeltable": | ||
list = $.grep(list, function(item) { return !item.isMeltable; }); | ||
list = $.grep(list, function (item) { return !item.isMeltable }); | ||
break; | ||
case "IsModel": | ||
list = $.grep(list, function(item) { return item.isModel; }); | ||
list = $.grep(list, function (item) { return item.isModel }); | ||
break; | ||
case "IsPoster": | ||
list = $.grep(list, function(item) { return item.isPoster; }); | ||
list = $.grep(list, function (item) { return item.isPoster }); | ||
break; | ||
case "IsPlant": | ||
list = $.grep(list, function(item) { return item.isSpacePlant; }); | ||
list = $.grep(list, function (item) { return item.isSpacePlant }); | ||
break; | ||
case "IsDecoration": | ||
list = $.grep(list, function(item) { return item.isDecoration; }); | ||
list = $.grep(list, function (item) { return item.isDecoration }); | ||
break; | ||
case "IsComponent": | ||
list = $.grep(list, function(item) { return item.isComponent; }); | ||
list = $.grep(list, function (item) { return item.isComponent }); | ||
break; | ||
case "IsReward": | ||
list = $.grep(list, function(item) { return item.isReward; }); | ||
list = $.grep(list, function (item) { return item.isReward }); | ||
break; | ||
case "!IsReward": | ||
list = $.grep(list, function(item) { return !item.isReward; }); | ||
list = $.grep(list, function (item) { return !item.isReward }); | ||
break; | ||
case "IsSelected": | ||
list = $.grep(list, function(item) { return item.isSelected; }); | ||
list = $.grep(list, function (item) { return item.isSelected }); | ||
break; | ||
case "IsFreeCCU": | ||
list = $.grep(list, function(item) { return item.isUpgrade && !item.hasValue; }); | ||
list = $.grep(list, function (item) { return item.isUpgrade && !item.hasValue }); | ||
break; | ||
case "!IsFreeCCU": | ||
list = $.grep(list, function(item) { return !item.isUpgrade || item.hasValue; }); | ||
list = $.grep(list, function (item) { return !item.isUpgrade || item.hasValue }); | ||
break; | ||
} | ||
|
||
return list; | ||
} |
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
Oops, something went wrong.