Plugin Directory

Changeset 3478286


Ignore:
Timestamp:
03/09/2026 03:47:15 PM (4 weeks ago)
Author:
alvinmuthui
Message:

1.0.2

Location:
toric
Files:
180 added
4 edited

Legend:

Unmodified
Added
Removed
  • toric/trunk/README.txt

    r2852518 r3478286  
    44Tags: QR Codes
    55Requires at least: 3.0.1
    6 Tested up to: 6.1
    7 Stable tag: 1.0.1
     6Tested up to: 6.9.1
     7Stable tag: 1.0.2
    88Requires PHP: 5.6.20
    99License: GPLv2 or later
     
    4949= 1.0.1 =
    5050Added live preview while editing the code value.
     51
     52= 1.0.2 =
     53* Tested with WordPress 6.9.1
     54* Fixed JS issue for copy to clipboard.
  • toric/trunk/admin/class-toric-admin.php

    r2852518 r3478286  
    55 * @link       https://profiles.wordpress.org/alvinmuthui/
    66 * @since      1.0.0
     7 * @category   WordPress Plugin
     8 * @author     Alvin Muthui <alvin.muthui@toriajax.com>
     9 * @license    GPL-2.0-or-later
    710 *
    811 * @package    Toric
  • toric/trunk/admin/js/toric-copy-to-clipboard.js

    r2850549 r3478286  
    1616      copied_text = element.value;
    1717  }
    18   navigator.clipboard.writeText(copied_text);// Add the text to the clipboard.
    19   showTooltipOnCopyToClipboardButton(element_to_show_success_id,sprintf(success_message,copied_text));
     18  if (navigator.clipboard && navigator.clipboard.writeText) {
     19    navigator.clipboard.writeText(copied_text).then(() => {
     20      showTooltipOnCopyToClipboardButton(element_to_show_success_id, sprintf(success_message, copied_text));
     21    }).catch(err => {
     22      console.error('Failed to copy: ', err);
     23    });
     24  } else {
     25    // Fallback for browsers that don't support Clipboard API
     26    const textArea = document.createElement('textarea');
     27    textArea.value = copied_text;
     28    document.body.appendChild(textArea);
     29    textArea.select();
     30    textArea.setSelectionRange(0, 99999);
     31    try {
     32      document.execCommand('copy');
     33      showTooltipOnCopyToClipboardButton(element_to_show_success_id, sprintf(success_message, copied_text));
     34    } catch (err) {
     35      console.error('Fallback: Oops, unable to copy', err);
     36    }
     37    document.body.removeChild(textArea);
     38  }
    2039}
    2140
     
    2342  var tooltip = document.getElementById(element_id);
    2443  tooltip.innerHTML = message;
     44  tooltip.style.visibility = 'visible';
     45  tooltip.style.opacity = '1';
     46  setTimeout(() => {
     47    tooltip.style.opacity = '0';
     48    setTimeout(() => {
     49      tooltip.style.visibility = 'hidden';
     50      tooltip.innerHTML = '';
     51    }, 1000); // Wait for transition to complete
     52  }, 2000);
    2553}
    2654
  • toric/trunk/toric.php

    r2852520 r3478286  
    1616 * Plugin URI:        https://wordpress.org/plugins/tori-codes/
    1717 * Description:       Allows you to create QR codes for your site.
    18  * Version:           1.0.1
     18 * Version:           1.0.2
    1919 * Author:            Alvin Muthui
    2020 * Author URI:        https://profiles.wordpress.org/alvinmuthui/
     
    3535 * Rename this for your plugin and update it as you release new versions.
    3636 */
    37 define( 'TORIC_VERSION', '1.0.1' );
     37define('TORIC_VERSION', '1.0.2');
    3838
    3939/**
     
    7474 */
    7575function run_toric() {
    76 
    7776    $plugin = new Toric();
    7877    $plugin->run();
Note: See TracChangeset for help on using the changeset viewer.