Skip to content

Commit 71e9ab5

Browse files
committed
Trigger events
1 parent 24bef46 commit 71e9ab5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

_layouts/default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ <h2>{{ site.description | default: site.github.project_tagline }}</h2>
3030
<hr>
3131
<h3>Editor</h3>
3232
<h4>Name</h4>
33-
<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;" onchange="document.getElementById('minified').textContent = document.getElementById('mininame').value;">
33+
<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;">
3434
<h4 style="maring-top: 10px;">Source code</h4>
35-
<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);" onchange="document.getElementById('minified').href = minify(document.getElementById('plaintext').value);">"use strict";</textarea>
35+
<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>
3636
<h4 style="maring-top: 10px;">Result</h4>
3737
<a id="minified" href="javascript:(function()%7B%22use%20strict%22%7D)()">Bookmarklet</a>
3838
</section>

javascripts/fill.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ async function fillSection(section, path) {
7676
edit.href = "#editor";
7777
edit.onclick = function(a1, a2) {
7878
return function() {
79-
document.getElementById('plaintext').value = a1;
80-
document.getElementById('mininame').value = a2;
79+
document.getElementById('plaintext').value(a1).trigger('input');
80+
document.getElementById('mininame').value(a2).trigger('input');
8181
}
8282
}(js, index[i].name);
8383
}

0 commit comments

Comments
 (0)