Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch copybtn.js-responsive Excluding Merge-Ins
This is equivalent to a diff from c6265bb3 to 2bc2f724
2025-08-13
| ||
15:48 | Allow the mimetype query parameter for non-CGI content in /ext. ... (Leaf check-in: 639b96b9 user: drh tags: trunk) | |
2025-08-12
| ||
15:27 | Use equal horizontal spacing for normal and "flipped" Copy Buttons (where the latter are positioned after the text to be copied). The idea is for the buttons to be tied to "their" text without spaces in between, resulting in a somewhat narrower spacing to emphasize the connection, but to have normal HTML whitespace on the other side. ... (Leaf check-in: 2bc2f724 user: florian tags: copybtn.js-responsive) | |
15:20 | Add some higher-specificity CSS declarations to prevent dark-mode skins from overriding the relevant styles of the Copy Button layout, so users don't need to sync their skin customizations with the changes on this branch. ... (check-in: b7f2c9f3 user: florian tags: copybtn.js-responsive) | |
15:04 | Revamp the Copy Buttons for a more responsive user experience. See the wiki page linked to this branch for more details. ... (check-in: 32c3a210 user: florian tags: copybtn.js-responsive) | |
2025-08-10
| ||
10:28 | Raise an error when trying to insert an unversioned file if the file size would cause the database row to exceed SQLITE_LIMIT_LENGTH. ... (check-in: c6265bb3 user: drh tags: trunk) | |
2025-08-07
| ||
19:46 | Add an assert() in a block which cannot happen. It survives 'reconstruct', so we can probably remove the block, but leaving it around for a while seems prudent. ... (check-in: 7d4af37f user: stephan tags: trunk) | |
Changes to src/copybtn.js.
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - - - + + + - - - - - + + + + + - - + + + + - + - - + + + + + - + - - - - - - - - | /* Manage "Copy Buttons" linked to target elements, to copy the text (or, parts ** thereof) of the target elements to the clipboard. ** |
︙ |
Changes to src/default.css.
︙ | |||
1134 1135 1136 1137 1138 1139 1140 | 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 | - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - | } label { white-space: nowrap; } label[for] { cursor: pointer; } |
︙ |
Changes to src/fossil.copybutton.js.
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + - - - - + + - - - - | .style: optional object of properties to copy directly into e.style. .oncopy: an optional callback function which is added as an event listener for the 'text-copied' event (see below). There is functionally no difference from setting this option or adding a 'text-copied' event listener to the element, and this option is |
︙ | |||
101 102 103 104 105 106 107 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + + + + + - + | ); D.copyStyle(e, opt.style); e.addEventListener( 'click', function(ev){ ev.preventDefault(); ev.stopPropagation(); |
Changes to src/fossil.numbered-lines.js.
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - - - | const tdLn = tbl.querySelector('td.line-numbers'); const urlArgsRaw = (window.location.search||'?') .replace(/&?\budc=[^&]*/,'') /* "update display prefs cookie" */ .replace(/&?\bln=[^&]*/,'') /* inbound line number/range */ .replace('?&','?'); const lineState = { urlArgs: urlArgsRaw, start: 0, end: 0 }; const lineTip = new F.PopupWidget({ |
︙ | |||
46 47 48 49 50 51 52 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - - + + - + - - + | ); }else{ D.append(link, "No lines selected."); } }, init: function(){ const e = this.e; |
︙ |
Changes to src/fossil.page.chat.js.
︙ | |||
899 900 901 902 903 904 905 | 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 | - + - | mouse-copying from that field collecting twice as many newlines as it should (for unknown reasons). */ const cpId = 'copy-to-clipboard-'+id; /* ^^^ copy button element ID, needed for LABEL element pairing. Recall that we destroy all child elements of `content` each time we hit this block, so we can reuse that element ID on subsequent toggles. */ |
︙ |
Changes to src/fossil.page.pikchrshow.js.
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | - + | F.onPageLoad(function() { document.body.classList.add('pikchrshow'); P.e = { /* various DOM elements we work with... */ previewTarget: E('#pikchrshow-output'), previewLegend: E('#pikchrshow-output-wrapper > legend'), previewCopyButton: D.attr( |
︙ | |||
117 118 119 120 121 122 123 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | - | return false; } }, false); //////////////////////////////////////////////////////////// // Setup clipboard-copy of markup/SVG... F.copyButton(P.e.previewCopyButton, {copyFromElement: P.e.taPreviewText}); |
︙ | |||
346 347 348 349 350 351 352 | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | - + | if(this.response.isError){ D.append(D.clearElement(preTgt), D.parseHtml(P.response.raw)); D.addClass(preTgt, 'error'); this.e.previewModeLabel.innerText = "Error"; return; } D.removeClass(preTgt, 'error'); |
︙ | |||
425 426 427 428 429 430 431 | 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | - + | P.response.isError = isError; D.enable(fp.toDisable); P.renderPreview(); }; } D.disable(fp.toDisable, this.e.previewModeToggle, this.e.markupAlignRadios); D.addClass(this.e.markupAlignWrapper, 'hidden'); |
︙ |
Changes to src/fossil.page.pikchrshowasm.js.
︙ | |||
310 311 312 313 314 315 316 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | - | modes.selectedIndex = (modes.selectedIndex + 1) % modes.length; this.e.previewModeLabel.innerText = this.renderModeLabels[modes[modes.selectedIndex]]; if(this.e.pikOut.dataset.pikchr){ this.render(this.e.pikOut.dataset.pikchr); } }.bind(PS)); F.copyButton(PS.e.previewCopyButton, {copyFromElement: PS.e.outText}); |
︙ |
Changes to src/fossil.page.wikiedit.js.
︙ | |||
1232 1233 1234 1235 1236 1237 1238 | 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 | - + - + | encodeURIComponent(wi.name), "&file=", encodeURIComponent(a.filename) ].join(''), "raw/"+a.src ].forEach(function(url){ const imgUrl = D.append(D.addClass(D.span(), 'monospace'), url); |
︙ |
Changes to src/pikchrshow.c.
︙ | |||
460 461 462 463 464 465 466 | 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | - - + + | CX(" selected, only that part is evaluated.\n*/\n"); CX("%s</textarea></div>",zContent/*safe-for-%s*/); } CX("</fieldset><!-- .zone-wrapper.input -->"); CX("<fieldset class='zone-wrapper output'>"); { CX("<legend><div class='button-bar'>"); CX("<button id='btn-render-mode'>Render Mode</button> "); CX("<span style='white-space:nowrap'>" |
︙ |
Changes to src/style.c.
︙ | |||
476 477 478 479 480 481 482 | 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 | - + | } /* ** Output TEXT with a click-to-copy button next to it. Loads the copybtn.js ** Javascript module, and generates HTML elements with the following IDs: ** ** TARGETID: The <span> wrapper around TEXT. |
︙ | |||
508 509 510 511 512 513 514 | 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 | - - - - - - + + + + + + + + - + - + - - - - - - + + + + + + + + | zText = vmprintf(zTextFmt/*works-like:?*/,ap); va_end(ap); if( cchLength==1 ) cchLength = hash_digits(0); else if( cchLength==2 ) cchLength = hash_digits(1); if( !bFlipped ){ const char *zBtnFmt = "<span class=\"nobr\">" |
︙ |