Skip to content

Commit

Permalink
Merge pull request #4 from realdigger/current
Browse files Browse the repository at this point in the history
Fix quick modify update issue. Change MathJax link to 2.7.2 version.
  • Loading branch information
realdigger authored Jan 18, 2018
2 parents d1ca7ff + 3723ee2 commit f60c3dc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Sources/Mod-MathJax.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* @package SMF MathJax Mod
* @author digger <http://mysmf.net>
* @copyright 2011—2017
* @copyright 2011—2018
* @license GPLv3
* @file Mod-MathJax.php
* @version 1.4.1
* @version 1.4.2
*/

if (!defined('SMF')) {
Expand Down Expand Up @@ -33,7 +33,7 @@ function loadMathJaxJs()
global $context;

$context['insert_after_template'] .= '
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=default,Safe"></script>';
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=default,Safe"></script>';
}


Expand Down Expand Up @@ -89,6 +89,6 @@ function addMathjaxCopyright()
global $context;

if ($context['current_action'] == 'credits') {
$context['copyrights']['mods'][] = '<a href="http://mysmf.net/mods/mathjax" title="SMF MathJax Mod" target="_blank">MathJax for SMF</a> &copy; 2011—2017, digger | <a href="http://www.mathjax.org" title="Powered by MathJax" target="_blank">Powered by MathJax</a>';
$context['copyrights']['mods'][] = '<a href="http://mysmf.net/mods/mathjax" title="SMF MathJax Mod" target="_blank">MathJax for SMF</a> &copy; 2011—2018, digger | <a href="http://www.mathjax.org" title="Powered by MathJax" target="_blank">Powered by MathJax</a>';
}
}
12 changes: 11 additions & 1 deletion modification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<id>digger:mathjax</id>
<name>MathJax</name>
<version>1.4</version>
<version>1.4.2</version>
<type>modification</type>

<file name="$themedir/Post.template.php">
Expand All @@ -18,4 +18,14 @@
</operation>
</file>

<file name="$themedir/scripts/topic.js">
<operation>
<search position="before"><![CDATA[ setInnerHTML(document.getElementById('modified_' + this.sCurMessageId.substr(4)), message.getElementsByTagName('modified')[0].childNodes[0].nodeValue);]]></search>
<add><![CDATA[
var math = document.getElementById('msg_' + this.sCurMessageId.substr(4));
MathJax.Hub.Queue(['Typeset', MathJax.Hub, math]);]]></add>
</operation>
</file>

</modification>
2 changes: 1 addition & 1 deletion package-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<package-info xmlns="http://www.simplemachines.org/xml/package-info">
<id>digger:mathjax</id>
<name>MathJax</name>
<version>1.4.1</version>
<version>1.4.2</version>
<type>modification</type>

<install for="2.0 - 2.0.99">
Expand Down

0 comments on commit f60c3dc

Please sign in to comment.