Created
July 2, 2013 17:46
-
-
Save dginev/5911461 to your computer and use it in GitHub Desktop.
Module meddler
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
<html> | |
<head> | |
<title>JOBAD v3 (CHAOS) Example Page</title> | |
<!-- This file has been generated automatically. Any changes will be overwritten. --> | |
<script src="./../../../js/deps/jquery/jquery-2.0.0.min.js"></script> | |
<script src="./../../../js/deps/jquery/jquery-ui-1.10.3.js"></script> | |
<script src="./../../../js/deps/underscore/underscore-min.js"></script> | |
<link href="./../../../css/jquery-ui.css" rel="stylesheet"> | |
<!-- Include JOBAD --> | |
<script src="./../../../build/release/JOBAD.js"></script> | |
<link href="./../../../css/JOBAD.css" rel="stylesheet"> | |
<!-- Load all the modules --> | |
<script type="text/javascript" src="./../../../../Demo/javascripts/ZeroClipboard.js"></script> | |
<script src="./../../../modules/menumeddling.js"></script> | |
<script type="text/javascript"> | |
var JOBAD1, JOBAD2; | |
JOBAD.noConflict._(); //prevent underscore conflicts | |
jQuery(function(){ | |
JOBAD1 = new JOBAD(jQuery("#1")); | |
JOBAD2 = new JOBAD(jQuery("#2")); | |
JOBAD1.modules.load('test.menumeddler', []); | |
JOBAD2.modules.load('test.menumeddler', []); | |
JOBAD1.Setup(); | |
JOBAD2.Setup(); | |
}) | |
</script> | |
</head> | |
<body> | |
<h1>JOBAD (Instance 1)</h1> | |
<div id='1'> | |
<div id='3'> | |
<b>No tooltip, just a menu. </b>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc bibendum, velit molestie eleifend tincidunt, neque metus facilisis nunc, vitae euismod mi neque nec erat. Proin luctus lacinia nisl vel commodo. Integer aliquam erat massa. Pellentesque semper neque vel diam tincidunt luctus dignissim lorem mollis. Donec dui dui, consequat non suscipit et, porttitor nec enim. Sed augue lorem, commodo a mollis eget, scelerisque quis urna. Phasellus ac erat urna, non luctus est. Proin eu mauris dolor, ut pulvinar ipsum. In hac habitasse platea dictumst. Donec eros odio, vulputate id placerat et, venenatis consectetur magna. | |
<p id='4'> | |
<b>A menu and a tooltip. </b>Hello WORLD. I am a subparagraph | |
</p> | |
</div> | |
<p> | |
<b>A menu and a tooltip. </b>Ut dolor est, pellentesque eu posuere et, faucibus non libero. Vestibulum sit amet augue a urna sagittis fermentum ultricies quis tortor. Aenean lacinia, arcu at bibendum fringilla, nisl sapien ultricies felis, vehicula consequat nisl enim vel mauris. Fusce tempus, velit eget porta placerat, orci arcu aliquam felis, ut vulputate magna erat ac nulla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris diam arcu, tempor a tempor at, pulvinar et justo. Nulla eu massa mi. Nunc id diam in arcu luctus facilisis at quis dolor. Aenean id diam orci, at elementum tellus. Donec id nisl nisi. | |
</p> | |
<p> | |
<b>A menu and a tooltip. </b>Donec vitae arcu eu sapien cursus adipiscing vitae vel ipsum. Suspendisse viverra malesuada massa non molestie. Donec consectetur, tellus at condimentum congue, nibh odio cursus magna, eget bibendum lacus augue eu elit. Suspendisse pellentesque, quam ut feugiat rhoncus, orci massa tempus libero, et rhoncus lacus felis at nisi. Curabitur sollicitudin nunc at lectus fringilla iaculis. In commodo porta est nec pharetra. Sed eget nisi sem, ac ornare ante. Suspendisse potenti. Suspendisse sed luctus lorem. Nulla facilisi. Integer iaculis blandit eleifend. | |
</p> | |
<p> | |
<b>A menu and a tooltip. </b>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque id massa eget elit condimentum fringilla. Nam malesuada odio eu tortor condimentum id aliquam elit tincidunt. Sed sit amet dolor non lorem interdum interdum eget id dolor. Maecenas congue lectus quis purus ultrices ut interdum enim consectetur. Nunc venenatis neque vitae lacus fringilla mollis. Morbi augue felis, dapibus at ultricies et, tincidunt vel velit. Morbi nisi purus, bibendum eget dapibus elementum, dictum nec diam. Proin ac elit massa, non sollicitudin justo. Etiam id risus mi, at interdum mi. Pellentesque et malesuada enim. Aliquam eros massa, eleifend aliquam feugiat ut, tincidunt quis urna. Vestibulum vehicula dolor eu augue lobortis cursus. Cras vitae urna nulla. Duis placerat orci et dolor egestas vulputate. Donec sed orci augue. | |
</p> | |
<p id='nomenu'> | |
<b>No menu at all. </b>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque id massa eget elit condimentum fringilla. Nam malesuada odio eu tortor condimentum id aliquam elit tincidunt. Sed sit amet dolor non lorem interdum interdum eget id dolor. Maecenas congue lectus quis purus ultrices ut interdum enim consectetur. Nunc venenatis neque vitae lacus fringilla mollis. Morbi augue felis, dapibus at ultricies et, tincidunt vel velit. Morbi nisi purus, bibendum eget dapibus elementum, dictum nec diam. Proin ac elit massa, non sollicitudin justo. Etiam id risus mi, at interdum mi. Pellentesque et malesuada enim. Aliquam eros massa, eleifend aliquam feugiat ut, tincidunt quis urna. Vestibulum vehicula dolor eu augue lobortis cursus. Cras vitae urna nulla. Duis placerat orci et dolor egestas vulputate. Donec sed orci augue. | |
</p> | |
</div> | |
<h1>JOBAD (Instance 2)</h1> | |
<b>All of these have a tooltip and a menu. </b> | |
<div id='2'> | |
<table id="S3.Ex4" class="ltx_equation"> | |
<tbody><tr class="ltx_equation ltx_align_baseline"> | |
<td class="ltx_eqn_pad"></td> | |
<td class="ltx_align_center"><math id="S3.Ex4.m1.1" class="ltx_Math" alttext="P(E)={n\choose k}p^{k}(1-p)^{{n-k}}" display="block" xref="S3.Ex4.m1.1.cmml"><semantics id="S3.Ex4.m1.1a" xref="S3.Ex4.m1.1.cmml"><mrow id="S3.Ex4.m1.1.15" xref="S3.Ex4.m1.1.15.cmml"><mrow id="S3.Ex4.m1.1.15.1" xref="S3.Ex4.m1.1.15.1.cmml"><mi id="S3.Ex4.m1.1.1" xref="S3.Ex4.m1.1.1.cmml">P</mi><mo id="S3.Ex4.m1.1.15.1.1" xref="S3.Ex4.m1.1.15.1.1.cmml">â¢</mo><mrow id="S3.Ex4.m1.1.3" xref="S3.Ex4.m1.1.3.cmml"><mo id="S3.Ex4.m1.1.3a" xref="S3.Ex4.m1.1.3.cmml">(</mo><mi id="S3.Ex4.m1.1.3b" xref="S3.Ex4.m1.1.3.cmml">E</mi><mo id="S3.Ex4.m1.1.3c" xref="S3.Ex4.m1.1.3.cmml">)</mo></mrow></mrow><mo id="S3.Ex4.m1.1.5" xref="S3.Ex4.m1.1.5.cmml">=</mo><mrow id="S3.Ex4.m1.1.15.2" xref="S3.Ex4.m1.1.15.2.cmml"><mrow id="S3.Ex4.m1.1.6" xref="S3.Ex4.m1.1.6.cmml"><mo id="S3.Ex4.m1.1.6a" xref="S3.Ex4.m1.1.6.cmml">(</mo><mtable rowspacing="0.2ex" id="S3.Ex4.m1.1.6b" columnspacing="0.4em" xref="S3.Ex4.m1.1.6.cmml"><mtr id="S3.Ex4.m1.1.6c" xref="S3.Ex4.m1.1.6.cmml"><mtd id="S3.Ex4.m1.1.6d" xref="S3.Ex4.m1.1.6.cmml"><mi id="S3.Ex4.m1.1.6.2" xref="S3.Ex4.m1.1.6.2.cmml">n</mi></mtd></mtr><mtr id="S3.Ex4.m1.1.6e" xref="S3.Ex4.m1.1.6.cmml"><mtd id="S3.Ex4.m1.1.6f" xref="S3.Ex4.m1.1.6.cmml"><mi id="S3.Ex4.m1.1.6.3" xref="S3.Ex4.m1.1.6.3.cmml">k</mi></mtd></mtr></mtable><mo id="S3.Ex4.m1.1.6g" xref="S3.Ex4.m1.1.6.cmml">)</mo></mrow><mo id="S3.Ex4.m1.1.15.2.1" xref="S3.Ex4.m1.1.15.2.1.cmml">â¢</mo><msup id="S3.Ex4.m1.1.15.2.2" xref="S3.Ex4.m1.1.15.2.2.cmml"><mi id="S3.Ex4.m1.1.7" xref="S3.Ex4.m1.1.7.cmml">p</mi><mi id="S3.Ex4.m1.1.8.1" xref="S3.Ex4.m1.1.8.1.cmml">k</mi></msup><mo id="S3.Ex4.m1.1.15.2.1a" xref="S3.Ex4.m1.1.15.2.1.cmml">â¢</mo><msup id="S3.Ex4.m1.1.15.2.3" xref="S3.Ex4.m1.1.15.2.3.cmml"><mrow id="S3.Ex4.m1.1.15.2.3.2" xref="S3.Ex4.m1.1.15.2.3.2.cmml"><mo id="S3.Ex4.m1.1.15.2.3.2a" xref="S3.Ex4.m1.1.15.2.3.2.cmml">(</mo><mrow id="S3.Ex4.m1.1.15.2.3.2b" xref="S3.Ex4.m1.1.15.2.3.2.cmml"><mn id="S3.Ex4.m1.1.10" xref="S3.Ex4.m1.1.10.cmml">1</mn><mo id="S3.Ex4.m1.1.11" xref="S3.Ex4.m1.1.11.cmml">-</mo><mi id="S3.Ex4.m1.1.12" xref="S3.Ex4.m1.1.12.cmml">p</mi></mrow><mo id="S3.Ex4.m1.1.15.2.3.2c" xref="S3.Ex4.m1.1.15.2.3.2.cmml">)</mo></mrow><mrow id="S3.Ex4.m1.1.14.1" xref="S3.Ex4.m1.1.14.1.cmml"><mi id="S3.Ex4.m1.1.14.1.1" xref="S3.Ex4.m1.1.14.1.1.cmml">n</mi><mo id="S3.Ex4.m1.1.14.1.2" xref="S3.Ex4.m1.1.14.1.2.cmml">-</mo><mi id="S3.Ex4.m1.1.14.1.3" xref="S3.Ex4.m1.1.14.1.3.cmml">k</mi></mrow></msup></mrow></mrow><annotation-xml id="S3.Ex4.m1.1.cmml" encoding="MathML-Content" xref="S3.Ex4.m1.1"><apply id="S3.Ex4.m1.1.15.cmml" xref="S3.Ex4.m1.1.15"><eq id="S3.Ex4.m1.1.5.cmml" xref="S3.Ex4.m1.1.5"></eq><apply id="S3.Ex4.m1.1.15.1.cmml" xref="S3.Ex4.m1.1.15.1"><times id="S3.Ex4.m1.1.15.1.1.cmml" xref="S3.Ex4.m1.1.15.1.1"></times><ci id="S3.Ex4.m1.1.1.cmml" xref="S3.Ex4.m1.1.1">P</ci><ci id="S3.Ex4.m1.1.3.cmml" xref="S3.Ex4.m1.1.3">E</ci></apply><apply id="S3.Ex4.m1.1.15.2.cmml" xref="S3.Ex4.m1.1.15.2"><times id="S3.Ex4.m1.1.15.2.1.cmml" xref="S3.Ex4.m1.1.15.2.1"></times><apply id="S3.Ex4.m1.1.6.cmml" xref="S3.Ex4.m1.1.6"><csymbol cd="latexml" id="S3.Ex4.m1.1.6.1.cmml">binomial</csymbol><ci id="S3.Ex4.m1.1.6.2.cmml" xref="S3.Ex4.m1.1.6.2">n</ci><ci id="S3.Ex4.m1.1.6.3.cmml" xref="S3.Ex4.m1.1.6.3">k</ci></apply><apply id="S3.Ex4.m1.1.15.2.2.cmml" xref="S3.Ex4.m1.1.15.2.2"><csymbol cd="ambiguous" id="S3.Ex4.m1.1.15.2.2.1.cmml">superscript</csymbol><ci id="S3.Ex4.m1.1.7.cmml" xref="S3.Ex4.m1.1.7">p</ci><ci id="S3.Ex4.m1.1.8.1.cmml" xref="S3.Ex4.m1.1.8.1">k</ci></apply><apply id="S3.Ex4.m1.1.15.2.3.cmml" xref="S3.Ex4.m1.1.15.2.3"><csymbol cd="ambiguous" id="S3.Ex4.m1.1.15.2.3.1.cmml">superscript</csymbol><apply id="S3.Ex4.m1.1.15.2.3.2.cmml" xref="S3.Ex4.m1.1.15.2.3.2"><minus id="S3.Ex4.m1.1.11.cmml" xref="S3.Ex4.m1.1.11"></minus><cn type="integer" id="S3.Ex4.m1.1.10.cmml" xref="S3.Ex4.m1.1.10">1</cn><ci id="S3.Ex4.m1.1.12.cmml" xref="S3.Ex4.m1.1.12">p</ci></apply><apply id="S3.Ex4.m1.1.14.1.cmml" xref="S3.Ex4.m1.1.14.1"><minus id="S3.Ex4.m1.1.14.1.2.cmml" xref="S3.Ex4.m1.1.14.1.2"></minus><ci id="S3.Ex4.m1.1.14.1.1.cmml" xref="S3.Ex4.m1.1.14.1.1">n</ci><ci id="S3.Ex4.m1.1.14.1.3.cmml" xref="S3.Ex4.m1.1.14.1.3">k</ci></apply></apply></apply></apply></annotation-xml><annotation id="S3.Ex4.m1.1b" encoding="application/x-tex" xref="S3.Ex4.m1.1.cmml">Congrats, jobad math works!</annotation></semantics></math></td> | |
<td class="ltx_eqn_pad"></td></tr> | |
</tbody></table> | |
</div> | |
<h1>No JOBAD below this line</h1> | |
<p> | |
In hac habitasse platea dictumst. Curabitur laoreet est in tortor vestibulum sed lacinia nibh aliquet. Maecenas facilisis posuere eros in consectetur. Donec sed posuere diam. Proin erat justo, viverra vel rhoncus eget, pulvinar elementum dui. Cras ut lorem quam. In cursus, ipsum in viverra commodo, lectus orci pretium neque, ut dignissim lectus ligula quis nunc. | |
</p> | |
<p> | |
Phasellus tempus pharetra nunc ut venenatis. Suspendisse in velit velit. Cras quam tortor, porta nec fermentum sed, varius nec nulla. Praesent imperdiet, nibh nec mattis dignissim, urna elit convallis risus, ac eleifend ipsum enim a dui. Nam at augue enim, placerat bibendum justo. Suspendisse et justo erat. Nullam quam enim, tempor sit amet venenatis eget, aliquet sit amet elit. | |
</p> | |
<p> | |
Maecenas porta commodo pharetra. Vivamus aliquam nunc at elit fermentum nec rhoncus turpis condimentum. Duis ultricies fermentum facilisis. Nunc tempor lacus in mi vestibulum adipiscing. Suspendisse hendrerit feugiat nisi ut eleifend. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec interdum turpis in nisl varius elementum in faucibus erat. | |
</p> | |
<p> | |
Curabitur est tellus, gravida nec elementum id, vehicula in elit. Maecenas et dignissim ante. Praesent urna erat, ornare vel ultricies ut, hendrerit nec mauris. Ut molestie vestibulum placerat. Aliquam nisl metus, feugiat et consectetur a, facilisis a tortor. Pellentesque eget porta ante. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sit amet dignissim est. Donec ac velit ligula, et mattis odio. Nunc gravida, risus ut pellentesque dapibus, diam ipsum egestas justo, at dapibus ante felis id sem. In sagittis lorem ut urna facilisis et consectetur ligula sagittis. | |
</p> | |
<p> | |
Cras tempor consectetur adipiscing. Ut laoreet, sapien at porta placerat, purus quam placerat leo, at viverra eros lorem ut erat. Curabitur ultrices ultricies libero non egestas. Fusce et viverra ipsum. Aenean mauris turpis, feugiat id vulputate vel, euismod non purus. Vestibulum quis tortor lectus. Aenean non porta odio. Vestibulum sollicitudin, lorem ac rhoncus vestibulum, felis neque ultrices massa, vitae volutpat nulla dui vitae odio. | |
</p> | |
<p> | |
Maecenas est tortor, molestie non tincidunt in, dictum in magna. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras lobortis tempus tristique. Praesent nec semper ipsum. Curabitur vel dolor in tellus congue sodales. Praesent id ipsum ipsum. Aenean vel nisl vitae ante gravida placerat quis eget ipsum. Sed a massa non lacus rhoncus sollicitudin. Ut ut magna vel diam luctus mollis quis pharetra urna. Integer nec aliquam est. In convallis rutrum justo a commodo. Proin lectus neque, venenatis vel tristique suscipit, pulvinar a nunc. Nam eros turpis, pellentesque a eleifend vel, posuere id mi. Aliquam consectetur sagittis massa eget suscipit. | |
</p> | |
<p> | |
Proin ornare congue dui, non lacinia metus tempus quis. Donec placerat molestie mollis. Aliquam ullamcorper vulputate dui, sit amet rhoncus felis cursus ut. Vivamus vel luctus nisi. Donec feugiat porttitor nunc aliquet auctor. Quisque tempus volutpat massa, non aliquet lectus adipiscing non. Aenean iaculis mollis enim, nec porta tortor tincidunt a. Aliquam faucibus eros vel orci pulvinar et scelerisque sapien interdum. Cras augue nulla, accumsan a lacinia et, interdum ut nunc. Aliquam rhoncus ultrices urna, sit amet aliquet enim ultricies id. Ut sed nunc lectus, at ultricies nisi. | |
</p> | |
<p> | |
Nulla vestibulum, nunc gravida rhoncus laoreet, elit libero dictum nisi, in varius nunc elit in turpis. Quisque dapibus ante ut elit luctus eu aliquet elit luctus. Duis lacinia lacus a tortor sollicitudin tempus. Proin sagittis magna sit amet sapien porta feugiat ut non felis. Praesent urna mi, tincidunt eu tincidunt dictum, blandit nec ipsum. Cras libero felis, vulputate non eleifend ullamcorper, vehicula vel nibh. Maecenas imperdiet sapien vitae mauris pellentesque quis euismod nisl aliquet. Etiam sed ante magna, a semper sem. | |
</p> | |
<p> | |
Mauris ac accumsan nisi. Fusce consectetur lorem nulla. Pellentesque nec urna nulla, et venenatis ligula. Aliquam sodales, purus non varius laoreet, sem nulla pharetra quam, vel adipiscing enim diam mollis orci. Morbi fermentum est quis elit malesuada placerat. Integer ligula ante, blandit consequat pharetra a, suscipit eget ligula. Ut sagittis facilisis risus, in faucibus diam pharetra quis. Aliquam vehicula blandit neque ac bibendum. Vivamus vestibulum, mi vitae volutpat semper, sapien libero suscipit tellus, ac consequat mi arcu nec dolor. Suspendisse accumsan nulla et diam pharetra mollis aliquet turpis dignissim. Cras ligula tortor, volutpat a varius in, congue eu nunc. Etiam placerat viverra faucibus. | |
</p> | |
<p> | |
Nunc eget magna dolor, malesuada pellentesque leo. Duis varius est eu quam lobortis pharetra. Sed imperdiet pretium eros vel iaculis. Suspendisse neque lorem, tincidunt sit amet consectetur a, faucibus eget risus. Aliquam quis orci felis. Etiam mollis consequat turpis, a accumsan tortor luctus ut. Nam ac neque vitae purus tempor fermentum ac sed sapien. Duis sit amet dapibus ipsum. Mauris pellentesque luctus vehicula. Praesent vehicula semper imperdiet. Nullam mattis facilisis nisl, eget congue erat auctor nec. Phasellus consectetur malesuada nisl, vel rhoncus orci hendrerit eleifend. Pellentesque fermentum nisl a felis accumsan condimentum. Aenean eu molestie tortor. Pellentesque luctus justo sit amet magna volutpat molestie. Suspendisse potenti. | |
</p> | |
<p> | |
Phasellus blandit volutpat dignissim. Aenean condimentum sapien eget nulla tincidunt ultrices. Aenean metus libero, ultrices at facilisis at, facilisis vitae elit. Praesent varius sem eu dui facilisis aliquam auctor ut est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ac lorem non augue scelerisque tempor in nec sapien. Morbi in leo lectus, ut feugiat eros. | |
</p> | |
</div> | |
</body> | |
</html> |
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
/* | |
example5.js - An example module for JOBAD. | |
Counts the words in a paragraph and shows a tooltip in the sidebar. | |
Currently also serves as an example for UserConfig. | |
Copyright (C) 2013 KWARC Group <kwarc.info> | |
This file is part of JOBAD. | |
JOBAD is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
JOBAD is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. | |
You should have received a copy of the GNU General Public License | |
along with JOBAD. If not, see <http://www.gnu.org/licenses/>. | |
*/ | |
(function($){ | |
JOBAD.modules.register({ | |
info:{ | |
'identifier': 'test.menumeddler', | |
'title': 'Test Module: Menu Meddler', | |
'author': 'DG and JW', | |
'description': 'Meddles with the menu. ' | |
}, | |
config: { | |
"test": ["string", function(x){return x[0] == "d";}, "default-value-goes-here", ["String", "Has to start with d"]], | |
"bool": ["bool", false, ["Boolean", "Another awesome setting. "]], | |
"num": ["number", [-10, 10], 0, ["Number", "An awesome number between -10 and 10. "]], | |
"int": ["integer", [-10, 10], 0, ["Integer", "An awesome integer between -10 and 10. "]], | |
"alist": ["list", [1, 2, 3, 4], 1, ["Select an option", "Auto", "Yes", "No", "Perhaps"]] | |
}, | |
contextMenuEntries: function(target) { | |
if(target.is('#nomenu,#nmenu *')){ //no menu for these elements | |
return false; | |
} | |
var math = target.closest('math'); | |
if (! math.is('math')) { return false;} | |
// 1. we create a hidden button anywhere | |
var $hidden_button = $("<button id='hiddenbutton' >button </button>"); | |
var $hidden_text = $("<div id='hiddenmathtocopy'>some starting text</div><br><br>"); | |
$('body').append($hidden_button); | |
$('body').append($hidden_text); | |
// $hidden_text.hide(); | |
//$hidden_button.hide(); | |
// 2. we add the zclip functionality to that button | |
$hidden_button.style ='none'; | |
ZeroClipboard.setMoviePath('file:///home/dig/Demo/javascripts/ZeroClipboard.swf'); | |
var clip = new ZeroClipboard.Client(); | |
clip.addEventListener('mouseDown', function (client) { | |
$hidden_button.trigger('mousedown'); | |
}); | |
clip.glue($hidden_button[0], $hidden_button.parent()[0]); | |
//$(window).bind('load resize',function(){clip.reposition();}); | |
return [ | |
["Copy TeX Source", function(element){ | |
var tex = math.find('annotation[encoding="application/x-tex"]').text(); | |
// $hidden_text.text(tex); | |
clip.setText(tex); | |
clip.receiveEvent('mouseDown', null); | |
}] | |
]; | |
} | |
}); | |
})(JOBAD.refs.$); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment