~migadu/alps-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Identify JavaScript as MIT/Expat for LibreJS

Details
Message ID
<20210403130308.2157-1-mark@markdain.net>
DKIM signature
pass
Download raw message
Patch: +12 -0
This commit introduces LibreJS compatible `@license' blocks as per
https://www.gnu.org/software/librejs/free-your-javascript.html

The magnet URI can be opened in a BitTorrent client to retrieve a copy
of the MIT/Expat license. Section 3.2.2.1 from the above link has a
list of magnet URIs for various free software licenses.
---
 themes/alps/assets/compose.js | 4 ++++
 themes/alps/assets/helpers.js | 4 ++++
 themes/alps/assets/print.js   | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/themes/alps/assets/compose.js b/themes/alps/assets/compose.js
index 23e67b6..061016e 100644
--- a/themes/alps/assets/compose.js
+++ b/themes/alps/assets/compose.js
@@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat

const textarea = document.querySelector("textarea.body");
if (window.location.pathname.endsWith("/reply")) {
	// Auto-focus body and scroll to bottom
@@ -206,3 +208,5 @@ function formatSI(num) {
  }
  return signPrefix + parseFloat(sig.toPrecision(3)) + PREFIXES[exponent];
}

// @license-end
diff --git a/themes/alps/assets/helpers.js b/themes/alps/assets/helpers.js
index 902fd00..cc092ce 100644
--- a/themes/alps/assets/helpers.js
+++ b/themes/alps/assets/helpers.js
@@ -1,3 +1,5 @@
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat

const check_all = document.getElementById("action-checkbox-all");
if (check_all) {
	check_all.style.display = "inherit";
@@ -8,3 +10,5 @@ if (check_all) {
		}
	});
}

// @license-end
diff --git a/themes/alps/assets/print.js b/themes/alps/assets/print.js
index c4379ad..8b2b22f 100644
--- a/themes/alps/assets/print.js
+++ b/themes/alps/assets/print.js
@@ -1,6 +1,10 @@
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat

const print = document.getElementById("print");
print.style.display = "inherit";
print.addEventListener("click", e => {
	e.preventDefault();
	window.print();
});

// @license-end
-- 
2.30.2
Details
Message ID
<CAE3YJUSUAED.25GSOJDTUMIA7@taiga>
In-Reply-To
<20210403130308.2157-1-mark@markdain.net> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
Thanks!

To git@git.sr.ht:~migadu/alps
   e645502..5cef0aa  master -> master
Reply to thread Export thread (mbox)