Commit b4746e9a authored by ronald's avatar ronald

wont download posters, earlier initialization

parent 92f1725e
'use strict'; 'use strict';
var initial = 0;
var skus = [];
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
chrome.declarativeContent.onPageChanged.addRules([{ chrome.declarativeContent.onPageChanged.addRules([{
...@@ -9,8 +11,6 @@ chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { ...@@ -9,8 +11,6 @@ chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
actions: [new chrome.declarativeContent.ShowPageAction()] actions: [new chrome.declarativeContent.ShowPageAction()]
}]); }]);
}); });
var initial = 0;
var skus;
chrome.extension.onMessage.addListener(function(request,sender,sendResponse){ chrome.extension.onMessage.addListener(function(request,sender,sendResponse){
skus = request.idArray.split(','); skus = request.idArray.split(',');
......
...@@ -38,6 +38,8 @@ if (link.match(/login/g)){ ...@@ -38,6 +38,8 @@ if (link.match(/login/g)){
downloadlist.forEach(function(a) { downloadlist.forEach(function(a) {
if(a.innerText.match(/(jpg|gif)/g)) { if(a.innerText.match(/(jpg|gif)/g)) {
a.click(); a.click();
if(a.innerText.match(/Poster/g))
a.click();
if(a.innerText.match(/^G/g)) { if(a.innerText.match(/^G/g)) {
if(!a.innerText.match(/Model/g)) if(!a.innerText.match(/Model/g))
a.click(); a.click();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment