Compare commits

..

No commits in common. "6136bd5c1fd80078c6780bd0e847cfb5cf99e43c" and "0b6c3a2722314661c32e70402149ab5270e342a0" have entirely different histories.

5 changed files with 18 additions and 18 deletions

View file

@ -1,14 +1,14 @@
# Datenstrom Yellow extension settings # Datenstrom Yellow extension settings
Extension: Externallinks Extension: Externallinks
Version: 0.9.2 Version: 0.9.1
Description: Opens external links in a new tab. Description: Open external links in a new tab.
Developer: Simon Rohr Developer: Simon Rohr
Tag: feature Tag: feature
DownloadUrl: https://codeberg.org/simonpipe/yellow-externallinks/archive/main.zip DownloadUrl: https://codeberg.org/simonpipe/yellow-externallinks/archive/main.zip
DocumentationUrl: https://codeberg.org/simonpipe/yellow-externallinks DocumentationUrl: https://codeberg.org/simonpipe/yellow-externallinks
DocumentationLanguage: en, de DocumentationLanguage: en, de
Published: 2026-05-28 09:20:00 Published: 2026-05-28 08:45:00
Status: available Status: experimental
system/workers/externallinks.php: externallinks.php, create, update system/workers/externallinks.php: externallinks.php, create, update
system/workers/externallinks.js: externallinks.js, create, update system/workers/externallinks.js: externallinks.js, create, update, careful

View file

@ -1,3 +1,4 @@
document.addEventListener('DOMContentLoaded', function() {
var links = document.querySelectorAll('a[href^="https://"], a[href^="http://"]'); var links = document.querySelectorAll('a[href^="https://"], a[href^="http://"]');
links.forEach(function(link) { links.forEach(function(link) {
if (!link.href.includes(window.location.hostname)) { if (!link.href.includes(window.location.hostname)) {
@ -5,3 +6,4 @@ links.forEach(function(link) {
link.setAttribute('rel', 'noopener noreferrer'); link.setAttribute('rel', 'noopener noreferrer');
} }
}); });
});

View file

@ -1,5 +1,5 @@
<?php <?php
// Opens external links in a new tab, https://codeberg.org/simonpipe/yellow-externallinks // External links in a new tab, https://codeberg.org/simonpipe/yellow-externallinks
class YellowExternallinks { class YellowExternallinks {
const VERSION = "0.9.2"; const VERSION = "0.9.2";

View file

@ -1,6 +1,6 @@
<p align="right"><a href="https://codeberg.org/simonpipe/yellow-externallinks/src/branch/main/readme-de.md">Deutsch</a> &nbsp; <a href="https://codeberg.org/simonpipe/yellow-externallinks/src/branch/main/readme.md">English</a></p> <p align="right"><a href="https://codeberg.org/simonpipe/yellow-externallinks/src/branch/main/readme-de.md">Deutsch</a> &nbsp; <a href="https://codeberg.org/simonpipe/yellow-externallinks/src/branch/main/readme.md">English</a></p>
# Externallinks 0.9.2 # Externallinks 0.9.1
Öffnet externe Links in einem neuen Tab. Öffnet externe Links in einem neuen Tab.
@ -15,4 +15,3 @@ Das Plugin funktioniert vollautomatisch. Links zu externen Websites werden in ei
## Entwickler ## Entwickler
Simon Rohr Simon Rohr
*Fediverse: <a href="https://snac.thepipes.ch/simon">@simon@snac.thepipes.ch</a>*

View file

@ -2,7 +2,7 @@
# Externallinks 0.9.2 # Externallinks 0.9.2
Opens external links in a new tab. Open external links in a new tab.
## Installation ## Installation
@ -15,4 +15,3 @@ The plugin works fully automatically. Links to an external website are opened in
## Developer ## Developer
Simon Rohr Simon Rohr
*Fediverse: <a href="https://snac.thepipes.ch/simon">@simon@snac.thepipes.ch</a>*