
xkcd
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
1.1 1 year ago
Thank you Hans-Peter for the changes.
z3ntu
4 years ago
Report
TuxmAL
4 years ago
33c33
< var re = new RegExp("Permanent link to this comic: http://xkcd.com/(\\d+)/");
---
> var re = new RegExp("Permanent link to this comic: https://xkcd.com/(\\d+)/");
47c47
< comic.requestPage("http:" + match[1], comic.Image);
---
> comic.requestPage("https:" + match[1], comic.Image);
a couple of fix again makes ' and " in additionalText looks like quote and double quote:
56c56,57
< comic.additionalText = match[2];
---
> var additionalTxt = match[2];
> comic.additionalText = additionalTxt.replace(/quot;/g, "\"").replace(/'/g, "'");
thanks!
Report
TuxmAL
4 years ago
56c56,57
< comic.additionalText = match[2];
---
> var additionalTxt = match[2];
> comic.additionalText = additionalTxt.replace(/quot;/g, "\"").replace(/&'/g, "'");
Report
TuxmAL
4 years ago
Report
mfuchs
4 years ago
Report
TuxmAL
4 years ago
Thanks for your work, it has been a good source to learn comics plugin!
Report
cbxAmadyne
6 years ago
Quote:
--- main.es 2009-02-01 03:40:16.000000000 +0100
+++ main_new.es 2015-04-02 08:26:04.215609602 +0200
@@ -41,10 +41,10 @@
}
}
if (id == comic.Page) {
- var re = new RegExp("<img src=\"(http://imgs.xkcd.com/comics/[^\"]+)\"");
+ var re = new RegExp("<img src=\"(//imgs\.xkcd\.com/comics/[^\"]+)\"");
var match = re.exec(data);
if (match != null) {
- comic.requestPage(match[1], comic.Image);
+ comic.requestPage("http:" + match[1], comic.Image);
} else {
comic.error();
return;
@@ -49,12 +49,15 @@
comic.error();
return;
}
-
//find the tooltip and the strip title of the comic
- re = new RegExp("src=\"http://imgs.xkcd.com/comics/.+\" title=\"([^\"]+)\" alt=\"([^\"]+)\"");
+ re = new RegExp("<img src=\"(//imgs\.xkcd\.com/comics/[^\"]+)\" title=\"([^\"]+)\"");
+ match = re.exec(data);
+ if (match != null) {
+ comic.additionalText = match[2];
+ }
+ re = new RegExp("<img src=\"(//imgs\.xkcd\.com/comics/[^\"]+)\".+alt=\"([^\"]+)\"");
match = re.exec(data);
if (match != null) {
- comic.additionalText = match[1];
comic.title = match[2];
}
}
Report
mfuchs
6 years ago
Report
cbxAmadyne
6 years ago
Quote:
--- main_new.es 2015-04-01 17:35:10.992105603 +0200
+++ main.es 2009-02-01 03:40:16.000000000 +0100
@@ -41,10 +41,10 @@
}
}
if (id == comic.Page) {
- var re = new RegExp("<img src=\"(//imgs.xkcd.com/comics/[^\"]+)\"");
+ var re = new RegExp("<img src=\"(http://imgs.xkcd.com/comics/[^\"]+)\"");
var match = re.exec(data);
if (match != null) {
- comic.requestPage("http:" + match[1], comic.Image);
+ comic.requestPage(match[1], comic.Image);
} else {
comic.error();
return;
Report
quazgar
6 years ago
For some comics this great plugin crashes the Plasma Desktop.
Report