I hereby claim:
- I am canop on github.
- I am dystroy (https://keybase.io/dystroy) on keybase.
- I have a public key whose fingerprint is 2015 FB66 CB39 EA9E 0D1E 2C04 ECDB 239B 9417 F31A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
(function() { | |
// setting it up so you can view it | |
document.documentElement.style.height = '100%'; | |
left.style.background = 'Transparent'; | |
right.style.background = 'Transparent'; | |
document.body.style.background = 'linear-gradient(to bottom, #F5F5F5 0%,#1E90FF 100%)'; | |
}()) | |
Math.Tau = Math.PI * 2; | |
// utils |
To deal with default argument value, we often use :
a = a || defaultValue;
or when a falsy value can be a valid argument :
if (a===undefined) a = defaultValue;
I think we could have some helpful sugar here, by which the last LOC would be written
$(function(){ | |
$('<a class="sceditor-button" unselectable="on" title="id monstre"><div unselectable="on" style="background-image:url(https://mehcig.bn1.livefilestore.com/y2pFL7YDttfhV4S1OWqwvMlXZGcHIEs4KlyS8Rywhft7EJYfi-7DW5o8eKlFz3VOFd_Itm8Y_JVrdMqXhzjCc5peMAWEKoKb-jIGXZhJ7XH1-w/IDM.png?psid=1)">Bouton Id Monstre</div></a>').insertAfter('.sceditor-button-quote').click(function(){ | |
var editor = $('#text_editor_textarea').sceditor("instance"); | |
var truc = editor.getSelection(); | |
editor.insertText( | |
"[url=http://games.mountyhall.com/mountyhall/View/MonsterView.php?ai_IDPJ=" + truc + "]" + truc + "[/url]" | |
); | |
}); | |
}); |