25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
741 B

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