config.yml.template update and surfinject

This commit is contained in:
Kyle Drake 2015-03-28 22:27:17 -07:00
parent 169a741213
commit 2e76bc9a0b
2 changed files with 11 additions and 0 deletions

View file

@ -13,6 +13,7 @@ development:
email_unsubscribe_token: 'somethingrandom'
surf_proxy_uri: 'http://surf.somedomain.local:9292' # May want to use dnsmasq instead of /etc/hosts here
surf_iframe_source: 'http://127.0.0.1:9292'
logs_path: /path/to/nginx/logs
test:
database: 'postgres://neocities@localhost/neocities_test'
database_pool: 1

10
public/js/surfinject.js Normal file
View 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>