💄 Add extend URL display style.
This commit is contained in:
@@ -23,22 +23,6 @@ HTMLElement.prototype.wrap = function(wrapper) {
|
||||
|
||||
NexT.utils = {
|
||||
|
||||
registerExtURL: function() {
|
||||
document.querySelectorAll('span.exturl').forEach(element => {
|
||||
const link = document.createElement('a');
|
||||
// https://stackoverflow.com/questions/30106476/using-javascripts-atob-to-decode-base64-doesnt-properly-decode-utf-8-strings
|
||||
link.href = decodeURIComponent(atob(element.dataset.url).split('').map(c => {
|
||||
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
||||
}).join(''));
|
||||
link.rel = 'noopener external nofollow noreferrer';
|
||||
link.target = '_blank';
|
||||
link.className = element.className;
|
||||
link.title = element.title;
|
||||
link.innerHTML = element.innerHTML;
|
||||
element.parentNode.replaceChild(link, element);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* One-click copy code support.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user