mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-05 19:57:31 +00:00
Slice Atavist; add comments.
This commit is contained in:
1 parent
a39b36f95a
commit
c15206160c
1 file changed
+14
-3
@@ -20,6 +20,7 @@
|
||||
// macOS
|
||||
if (!CSS.supports("-webkit-touch-callout", "none")) {
|
||||
|
||||
// make each .nnw-enclosure-image img a link to its img file
|
||||
document.querySelectorAll(".nnw-enclosure-image img").forEach(img => {
|
||||
|
||||
const a = document.createElement("a");
|
||||
@@ -32,6 +33,7 @@ if (!CSS.supports("-webkit-touch-callout", "none")) {
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// `slice` WordPress → `sizes=auto,`
|
||||
const feedLink = document.querySelector(".feedlink");
|
||||
|
||||
// TechCrunch → Reader View
|
||||
@@ -49,6 +51,14 @@ if (feedLink.href.includes("https://www.propublica.org/")) {
|
||||
img.sizes = img.sizes.split(",").slice(1).join(",").trim();
|
||||
});
|
||||
}
|
||||
|
||||
// Atavist
|
||||
if (feedLink.href.includes("https://magazine.atavist.com/")) {
|
||||
|
||||
document.querySelectorAll("img[sizes^='auto']").forEach(img => {
|
||||
img.sizes = img.sizes.split(",").slice(1).join(",").trim();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
@@ -68,11 +78,12 @@ if (feedLink.href.startsWith("https://xkcd.com/")) {
|
||||
// macOS
|
||||
if (!CSS.supports("-webkit-touch-callout", "none")) {
|
||||
|
||||
// xkcd
|
||||
const feedLink = document.querySelector(".feedlink");
|
||||
|
||||
|
||||
// xkcd
|
||||
if (feedLink.href.startsWith("https://xkcd.com/")) {
|
||||
|
||||
|
||||
// make each img a link to its img file
|
||||
document.querySelectorAll("img").forEach(img => {
|
||||
|
||||
const a = document.createElement("a");
|
||||
|
||||
Reference in new issue
Block a user