💄 Add extend URL display style.
This commit is contained in:
@@ -9,7 +9,6 @@ if (!window.NexT) window.NexT = {};
|
||||
"scheme" : "{{ .Site.Params.scheme }}",
|
||||
"darkmode" : {{ .Site.Params.darkmode }},
|
||||
"version" : "{{ .Site.Data.config.version }}",
|
||||
"exturl" : {{ .Site.Params.exturl }},
|
||||
"sidebar" : {{ .Site.Params.sidebar | jsonify }},
|
||||
"copycode" : {{ .Site.Params.codeblock.copyBtn | jsonify }},
|
||||
"bookmark" : {{ .Site.Params.bookmark | jsonify }},
|
||||
|
||||
@@ -37,7 +37,7 @@ NexT.boot.refresh = function() {
|
||||
* Register JS handlers by condition option.
|
||||
* Need to add config option in Front-End at 'scripts/helpers/next-config.js' file.
|
||||
*/
|
||||
CONFIG.prism && window.Prism.highlightAll();
|
||||
//CONFIG.prism && window.Prism.highlightAll();
|
||||
/*CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img', {
|
||||
background: 'var(--content-bg-color)'
|
||||
});*/
|
||||
|
||||
@@ -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