Quote:
Originally Posted by berangus
Super, glad I could help out! Big thanks for this new code, it works aces although it required a tiny fix - guess I know a little about this stuff after all. In the first line of the function there's a single quotation where it should be a double: src=("|") instead of src=('|"). So the whole thing becomes thus:
Host Label: pixxxels
URL Pattern: ^https?:\/\/(?:s\d+\.)?pixxxels\.org\/image\/.+$
Search Pattern:
Code:
function(pageData, pageUrl) {
var iUrl = pageData.match(/src=("|")(https?:\/\/s\d+\.pixxxels\.org\/.+?\.jpg)\1/);
return iUrl ? {imgUrl: iUrl[2] + "?dl=1", status: "OK"} : {imgUrl: null, status: "ABORT"}
}
|
No. What you've done there is change it from handling either single or double quotes, to only handling double quotes. The parens. denote a group. Inside it are options, separated by the pipe sign. You're saying: either double-quote or double-quote. It should be left as it was: either single-quote or double-quote.