-
Fototrend
JavaScript != Java (A JavaScript nem összekeverendő a Javával, két különböző programozási nyelvről van szó!)
Új hozzászólás Aktív témák
-
nevemfel
senior tag
válasz
Archttila #10115 üzenetére
Nálam ez a kód működik:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<a href="https://dereferer.me/?https://www.imdb.com/title/tt1448754/">Link 1</a>
<script>
(function () {
'use strict';
const REPLACEMENTS = {
'dereferer.link': {
pattern: /^https?:\/\/(?:www\.)?dereferer\.link\/\?(.+:\/\/.+)/,
noreferrer: true,
},
'dereferer.me': {
pattern: /^https?:\/\/(?:www\.)?dereferer\.me\/\?(.+:\/\/.+)/,
noreferrer: true,
},
};
for (const el of document.querySelectorAll('a')) {
for (const [name, repl] of Object.entries(REPLACEMENTS)) {
const match = repl.pattern.exec(el.href);
if (match) {
const origUrl = match[1];
console.debug(`Dereferer Remover (${name}): replacing ${el.href} -> ${origUrl}`);
el.href = origUrl;
if (repl.noreferrer) {
el.rel = 'noreferrer';
}
}
}
}
}());
</script>
</body>
</html>
Új hozzászólás Aktív témák
- MSI CreatorPro Z16P RTX A5500 TOUCH! (vapor chamberrel)
- Eladó Xiaomi Redmi A2 64GB / 12 hó jótállás
- Gamer PC-Számítógép! Csere-Beszámítás! R5 5500 / RX 6600XT / 32GB DDR4 / 512GB SSD
- 0perces !Samsung Galaxy Book5 Pro 360 2in1 Core Ultra 7 256V 16GB 1TB 16" WQXGA+ AMOLED TOUCH 1évgar
- DOKKOLÓ BAZÁR! Lenovo, HP, DELL és egyéb más dokkolók (TELJES SZETTEK)
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Promenade Publishing House Kft.
Város: Budapest