- flatpak.opendesktop.org
- api2_kde-look_org
- pling.me
- Mycroft-Skillsx
- ubuntu-look.org
- bodhi.pling.com
- Mycroft-Appsx
- Snaps
- Youpinion
- electron-webapps.com
- OpenTV-Skills
- Zynthbox Resources
- DSP56300
- apps-bigscreen
- Mycroft-Skillsx
- Beryl-Themes
- All-Linux
- Screenshots
- Falkon
- Krunner Addons
- LibreOffice
- Compiz
- ElectronicAttack
- Bigscreen
- Books
- Videos
- Music
- Comics
- Mycroft-Skillsx
- Tutorials
- api2.kde-look.org
- Zynthian
- PatchR
- api.vlc-addons.org
- kde-look.org
- api.kde-look.org
- X-Archive
- vlc-addons.org
- Apps
- Games
- api.appimagehub.com
- AppImageHub.com
- Arch-Packages
- Debian-Packages
- OpenSuse-RPMs
- Redhat-RPMs
- Android-APKs
- OSX-Packages
- Windows-Packages
- App-Addons
- VLC-Addons
- Krita-Addons
- Opendesktop
- api.opendesktop.org
- Cinnamon
- Enlightenment
- api.gnome-look.org
- Gnome
- KDE Store
- Mate
- Trinity
- XFCE
- Window-Managers
- E-OS
- Artwork
- Cliparts
- Fonts
- ALL
- api.pling.com
- Listings
- Wallpapers
- Phones
- Distros
- Application Styles11
- Cursors1023
- deKorator Themes175
- Emoticons125
- Full Icon Themes1756
- Global Themes (Plasma 5)472
- Global Themes (Plasma 6)232
- KDE App-Addons3036
- KDE Game-Addons143
- KDE Plasma Extensions2459
- KDE Plasma Screenshots3133
- Kvantum316
- KWin (Plasma 5)176
- KWin Effects28
- KWin Scripts41
- Kwin Switching Layouts2
- Latte Dock79
- Mycroft Skills127
- Plasma 6 Splashscreens126
- Plasma 6 Window Decorations175
- Plasma Color Schemes2171
- Plasma Mobile Wallpapers4
- Plasma Splashscreens1563
- Plasma Themes897
- Plasma Window Decorations682
- Plymouth Themes542
- QSvgStyles5
- QtCurve550
- SDDM Login Themes689
- SMPlayer/MPlayer33
- Sysmon 6 Applet Designs6
- Telegram Themes21
- Various Plasma 6 Improvements5
- Various Plasma Theming23
- Various Qt Stuff297
- Wallpapers KDE Plasma12170
- Panon Shaders6
- Plasma 4 Extensions622
- Plasma 5 Extensions409
- Plasma 5 Wallpaper Plugins33
- Plasma 6 Extensions228
- Plasma 6 Wallpaper Plugins15
- Plasma Comic Sources190
- System Monitor 6 Applets6
- System Monitor Applets10
- Various KDE 1.-4. Improvements773
- Various KDE Stuff139
- Various Plasma 5 Improvements23
- Various Plasma 6 Improvements5


xkcd
Source i (link to git-repo or to original if based on someone elses unmodified work):
6
Become a Fan
5.5
Description:
xkcd (http://xkcd.com/) plugin for plasma comic. Last changelog:
2.0
Thanks to Mike Vastola for his updates to make the comic work again.
To reduce the risk for issues in the future Mike changed the code to use XKCD's JSON API.
Loading...
Pling

0 Affiliates
Details
license
version 2.0
updated
added
downloads 24h 26
mediaviews 24h 0
pageviews 24h 2
More Plasma Comic Sources from mfuchs:
Other Plasma Comic Sources:

Ratings & Comments
18 Comments
8 8 great
Thanks for this addon. It's worked for the longest time. I've been running into issues for a while now though, and I tried @TuxmAL's patch, but it didn't work (the regex still wasn't parsing correctly). I played with the code a bit (okay, a lot) and changed things to use XKCD's JSON API instead, which makes parsing much easier and hopefully also makes this more resilient to website changes. I'm not sure if this is still being maintained, but if so, feel free to incorporate my changes. I could fork, but it would be nicer to fix things for long-time users of this comic addin instead. See: https://gist.github.com/mvastola/6d937854f2202091afc2fbb2f7253ef6
Hi Mike, the patch from @TuxmAL actually worked for me today. Anyhow I like the idea of parsing the JSON, hope it is more robust so it gets used here on the main branch. Thanks to you both!
Thank you very much for your patch! I applied it and it works again now. Your solution seems way more robust than what I had there. :)
And sorry for the long delay.
Some changes in xkcd.com site, has broken xkcd comics again. To restore the functionality please add this patch to the downloaded version: ``` 35c35 < var re = new RegExp("Permanent link to this comic: https://xkcd.com/(\\d )/"); --- > var re = new RegExp("https://xkcd.com/(\\d )/"); 86c86 < var re = new RegExp("Image URL \\(for hotlinking/embedding\\): (https://imgs\.xkcd\.com/comics/. )"); --- > var re = new RegExp('"(https://imgs\.xkcd\.com/comics/. )"'); ```
Thank you for the information. I am sorry that it took me so long to react.
You're welcome!
Broken, please fix :)
Hi, I've noted a change in xkcd.com site, gone full https now. Here are the fixes needed to patch the code: 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!
ops! last patch is 56c56,57 < comic.additionalText = match[2]; --- > var additionalTxt = match[2]; > comic.additionalText = additionalTxt.replace(/&#quot;/g, "\"").replace(/&'/g, "'");
ugh! Last replace contains / & # 3 9 ;/ (remove spaces between chars).
Thanks for your work! I updated the comic.
You are welcome! Thanks for your work, it has been a good source to learn comics plugin!
The original code does not handle empty "title" and "alt" tags to well. This patch fixes that as well:http://download.amadyne.net/xkcd-main-2015-04.patch 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];
}
}
Thanks for the patch. :) I updated xkcd using your changes.
xkcd.com has updated the image link to no longer contain "http:" 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;
Please have a look at KDE bug #333063 https://bugs.kde.org/show_bug.cgi?id=333063 For some comics this great plugin crashes the Plasma Desktop.