Fossil

Check-in [16fcd48a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Minor tweak to the copybtn.js interface to fall back to the default element ID "copy-IDTARGET".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | copybtn.js-tweaks
Files: files | file ages | folders
SHA3-256: 16fcd48aa46d909f9441ca3cdb334485e43b8269aeb7fb834e76719df8791963
User & Date: florian 2019-06-07 12:03:00
Context
2019-06-07
13:10
Minor name changes to new routines. Closed-Leaf check-in: ef848025 user: drh tags: copybtn.js-tweaks
12:03
Minor tweak to the copybtn.js interface to fall back to the default element ID "copy-IDTARGET". check-in: 16fcd48a user: florian tags: copybtn.js-tweaks
11:56
Make sure copy buttons stay on the same line as the linked text. check-in: 678018d3 user: florian tags: copybtn.js-tweaks
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/copybtn.js.

28
29
30
31
32
33
34

35
36
37
38
39
40
41
  elButton.className = "copy-button";
  if( bFlipped ) elButton.className += " copy-button-flipped";
  elButton.id = "copy-" + idTarget;
  initCopyButton(elButton,idTarget,cchLength);
  return elButton;
}
function initCopyButtonById(idButton,idTarget,cchLength){

  var elButton = document.getElementById(idButton);
  if( elButton ) initCopyButton(elButton,idTarget,cchLength);
  return elButton;
}
function initCopyButton(elButton,idTarget,cchLength){
  elButton.style.transition = "";
  elButton.style.opacity = 1;







>







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  elButton.className = "copy-button";
  if( bFlipped ) elButton.className += " copy-button-flipped";
  elButton.id = "copy-" + idTarget;
  initCopyButton(elButton,idTarget,cchLength);
  return elButton;
}
function initCopyButtonById(idButton,idTarget,cchLength){
  idButton = idButton || "copy-" + idTarget;
  var elButton = document.getElementById(idButton);
  if( elButton ) initCopyButton(elButton,idTarget,cchLength);
  return elButton;
}
function initCopyButton(elButton,idTarget,cchLength){
  elButton.style.transition = "";
  elButton.style.opacity = 1;