Difference between revisions of "MediaWiki:Common.js"

m
added clip js
m (changed copy to text)
m (added clip js)
Line 2: Line 2:
mw.loader.load( 'https://cdn.jsdelivr.net/npm/uikit@3.5.8/dist/js/uikit.min.js' );
mw.loader.load( 'https://cdn.jsdelivr.net/npm/uikit@3.5.8/dist/js/uikit.min.js' );
mw.loader.load( 'https://cdn.jsdelivr.net/npm/uikit@3.5.8/dist/js/uikit-icons.min.js' );
mw.loader.load( 'https://cdn.jsdelivr.net/npm/uikit@3.5.8/dist/js/uikit-icons.min.js' );
 
mw.loader.load( 'https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js' );
function copyTextToCb() {
      /* Get the text field */
      var copyText = document.getElementById("copy-to-clipboard-text");
   
      /* Select the text field */
      copyText.select();
      copyText.setSelectionRange(0, 99999); /*For mobile devices*/
   
      /* Copy the text inside the text field */
      document.execCommand("copy");
   
      /* Alert the copied text */
      alert("Copied the text: " + copyText.value);
    }