Skip to content

Commit

Permalink
Removed unneeded cross-site scripting override. Clean up.
Browse files Browse the repository at this point in the history
Signed-off-by: Or Sharir <or@sharir.org>
  • Loading branch information
orsharir committed Apr 12, 2017
1 parent d649cd9 commit 4613efa
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 70 deletions.
28 changes: 0 additions & 28 deletions background.js

This file was deleted.

34 changes: 0 additions & 34 deletions content.js
@@ -1,44 +1,10 @@
var config = chrome.extension.getURL('mathjax_config.js');
// $('script').first().after('<script type="text/javascript" src="' + config + '" ></script>');
var mathjax = chrome.extension.getURL('MathJax/MathJax.js');
// $('script').first().after('<script type="text/javascript" src="' + mathjax + '" ></script>');
var jquery = chrome.extension.getURL('jquery-min-1.7.2.js');
// $('script').first().after('<script type="text/javascript" src="' + jquery + '" ></script>');
var dynamic_math = chrome.extension.getURL('dynamic_math.js');
// $('script').first().after('<script type="text/javascript" src="' + dynamic_math + '" ></script>');

$.include([config, jquery], function() {
$.include([mathjax], function() {
$.include([dynamic_math]);
});
});
// $('script').first().after('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>');
// var render_math_in_preview = 'document.addEventListener("pjax:end", function(){alert("Test");MathJax.Hub.Queue(["Typeset", MathJax.Hub]);});';
// var render_math_in_preview = '\
// jQuery(".js-preview-tab").on("click", function(e) { \
// function didLoadPreview() { \
// alert("Test3!!!"); \
// alert(window.MathJax);\
// window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub]); \
// } \
// setTimeout(didLoadPreview, 500); \
// });';
// alert(render_math_in_preview);
// $('script').first().after('<script type="text/javascript">' + render_math_in_preview + '</script>');
// $(document).on('preview:render', function (t) {
// alert('preview:render');
// MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
// });
// $.ready(function(){
// $('.js-preview-tab').on("click", function(e) {
// function didLoadPreview() {
// alert("Test3!!!");
// window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub]);
// }
// setTimeout(didLoadPreview, 2000);
// });
// });

// $.ready(function(){
// preview:render
// });
9 changes: 1 addition & 8 deletions manifest.json
Expand Up @@ -2,17 +2,10 @@
"manifest_version": 2,
"name": "GitHub with MathJax",
"description": "Renders Github equations with MathJax",
"version": "0.1.2",
"version": "0.2",
"permissions": [
"management",
"webRequest",
"webRequestBlocking",
"https://github.com/*"
],
"background": {
"scripts": ["background.js"],
"persistent": true
},
"web_accessible_resources": ["mathjax_config.js", "MathJax/*", "jquery-min-1.7.2.js", "dynamic_math.js"],
"content_scripts": [
{
Expand Down

0 comments on commit 4613efa

Please sign in to comment.