From 35aa577402252f62a73d74b3af395b7361e955b7 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 25 Sep 2015 11:04:36 +0100 Subject: [PATCH] Fixed readme display errors. So the test page actually works now! --- src/global.js | 2 +- src/injections/github.js | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/global.js b/src/global.js index 3da413c..01a6236 100644 --- a/src/global.js +++ b/src/global.js @@ -8,7 +8,7 @@ function insert_emoticons(ident, classes) { image = decoder[i][key]; key = "(" + key + ")"; $(this).html($(this).html().replace(key, - "" + "" )); } }); diff --git a/src/injections/github.js b/src/injections/github.js index 2f6de8d..9f5faa7 100644 --- a/src/injections/github.js +++ b/src/injections/github.js @@ -8,7 +8,7 @@ function change_readme() { function change_wiki() { console.log("Changing wiki"); - insert_emoticons('#markdown-body'); + insert_emoticons('#wiki-body'); } function change_commits() { @@ -25,9 +25,23 @@ $('form .timeline-comment textarea[placeholder="Leave a comment"]').on('change i markdown_decoder('form .timeline-comment textarea[placeholder="Leave a comment"]'); }); -$('#markdown-body').on('DOMNodeInserted DOMNodeRemoved change load', change_wiki); +$('#wiki-body').on('load change', change_wiki); -$('table.timeline-commits').on('change load', change_commits); +$('table.timeline-commits').on('load chang', change_commits); + +$('a.wiki-page-link').on('click', function() { + change_comments(); + change_commits(); + change_readme(); + change_wiki(); +}); + +$('a.sunken-menu-item').on('click', function() { + change_comments(); + change_commits(); + change_readme(); + change_wiki(); +}); $(document).on('ready', function() { console.log("Ready");