mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-08-20 05:12:25 +00:00
deploy: 68e89ca171
This commit is contained in:
parent
18625a8d8d
commit
01681bf7e4
359 changed files with 7879 additions and 7879 deletions
js
|
@ -305,7 +305,7 @@ function initSwagger( update, attrs ){
|
|||
|
||||
function initAnchorClipboard(){
|
||||
document.querySelectorAll( 'h1~h2,h1~h3,h1~h4,h1~h5,h1~h6').forEach( function( element ){
|
||||
var url = encodeURI(document.location.origin + document.location.pathname);
|
||||
var url = encodeURI( (document.location.origin == "null" ? (document.location.protocol + "//" + document.location.host) : document.location.origin )+ document.location.pathname);
|
||||
var link = url + "#" + element.id;
|
||||
var new_element = document.createElement( 'span' );
|
||||
new_element.classList.add( 'anchor' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue