Skip to content

Commit dcde2fc

Browse files
committed
Fix triggers
1 parent 71e9ab5 commit dcde2fc

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

_layouts/default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ <h2>{{ site.description | default: site.github.project_tagline }}</h2>
3131
<h3>Editor</h3>
3232
<h4>Name</h4>
3333
<input class="container" style="background: rgba(0,0,0,0.9); border: 1px solid rgba(255,255,255,0.15); padding: 10px; font-size: 16px; color: #d0d0d0; border-radius: 2px; word-wrap: normal; overflow: auto; overflow-y: hidden;" type="text" id="mininame" name="mininame" value="Bookmarklet" oninput="document.getElementById('minified').textContent = document.getElementById('mininame').value;">
34-
<h4 style="maring-top: 10px;">Source code</h4>
34+
<h4 style="margin-top: 10px;">Source code</h4>
3535
<textarea class="container" style="height: 20em; background: rgba(0,0,0,0.9); border: 1px solid rgba(255,255,255,0.15); padding: 10px; font-size: 16px; color: #d0d0d0; border-radius: 2px; word-wrap: normal; overflow: auto; overflow-y: hidden;" id="plaintext" name="plaintext" oninput="document.getElementById('minified').href = minify(document.getElementById('plaintext').value);">"use strict";</textarea>
36-
<h4 style="maring-top: 10px;">Result</h4>
36+
<h4 style="margin-top: 10px;">Result</h4>
3737
<a id="minified" href="javascript:(function()%7B%22use%20strict%22%7D)()">Bookmarklet</a>
3838
</section>
3939
</div>

javascripts/fill.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,12 @@ async function fillSection(section, path) {
7676
edit.href = "#editor";
7777
edit.onclick = function(a1, a2) {
7878
return function() {
79-
document.getElementById('plaintext').value(a1).trigger('input');
80-
document.getElementById('mininame').value(a2).trigger('input');
79+
var e1 = document.getElementById('plaintext');
80+
e1.value = a1;
81+
e1.trigger('input');
82+
var e2 = document.getElementById('mininame');
83+
e2.value = a2;
84+
e2.trigger('input');
8185
}
8286
}(js, index[i].name);
8387
}

0 commit comments

Comments
 (0)