Last active
August 29, 2015 14:19
-
-
Save Fysac/f845f2a6b8367e805033 to your computer and use it in GitHub Desktop.
Wikispaces Discussion Workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
// Add this as an "Other HTML" widget to your wiki's navigation menu. | |
window.onload = setTimeout(function(){ | |
while (wikispaces_page.indexOf(" ") != -1){ | |
wikispaces_page = wikispaces_page.replace(" ", "+"); | |
} | |
var anchors = document.getElementsByTagName("a"); | |
for (var i = 0; i < anchors.length; i++) { | |
if (anchors[i].href.indexOf(wikispaces_page + "#discussion") != -1){ | |
anchors[i].href = "/page/messages/" + wikispaces_page; | |
} | |
} | |
}, 100); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment