mirror of
https://github.com/neocities/neocities.git
synced 2025-05-16 09:27:20 +02:00
config.yml.template update and surfinject
This commit is contained in:
parent
169a741213
commit
2e76bc9a0b
2 changed files with 11 additions and 0 deletions
10
public/js/surfinject.js
Normal file
10
public/js/surfinject.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
<script>
|
||||
function _nc_surf_page_overload() {
|
||||
var ele = document.getElementsByTagName('a')
|
||||
for(var i=0; i<ele.length; i++) {
|
||||
if(ele[i].href.match(/^\w+:\/\//i) && !ele[i].href.match(/^.+\.neocities\.org/i))
|
||||
ele[i].setAttribute('target', '_blank')
|
||||
}
|
||||
}
|
||||
_nc_surf_page_overload()
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue