You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 line
657 B

  1. // find files changed since last version
  2. wn.versions.check();
  3. /* overload links for ajax pages */
  4. $(document).bind('ready', function() {
  5. var base = window.location.href.split('#')[0];
  6. // convert hard links to softlinks
  7. $.each($('a[softlink!="false"]'), function(i, v) {
  8. // if linking on the same site
  9. if(v.href.substr(0, base.length)==base) {
  10. var path = (v.href.substr(base.length));
  11. // if hardlink, softlink it
  12. if(path.substr(0,1)!='#') {
  13. v.href = base + '#' + path;
  14. }
  15. }
  16. });
  17. // go to hash page if exists
  18. if(!wn.settings.no_history && window.location.hash) {
  19. wn.page.set(window.location.hash.substr(1));
  20. }
  21. });