Plugin Directory

Changeset 2126294


Ignore:
Timestamp:
07/21/2019 03:34:02 PM (7 years ago)
Author:
gtanyware
Message:

V2.4.4 Add 'or' clause to 'attach'

Location:
easycoder/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • easycoder/trunk/easycoder.php

    r2118094 r2126294  
    44  * Plugin URI: https://easycoder.software
    55  * Description: Control the appearance and behavior of your posts and pages by embedding simple English-like scripts, without the need to learn JavaScript.
    6   * Version: 2.4.3
     6  * Version: 2.4.4
    77  * Author: EasyCoder Software
    88  * Author URI: https://easycoder.software
     
    1717  function easycoder_enqueue_script() {   
    1818    wp_enqueue_script('easycoder_script', plugin_dir_url( __FILE__ )
    19             . 'easycoder-min.js', array(), '2.4.3');
     19            . 'easycoder-min.js', array(), '2.4.4');
    2020  }
    2121 
  • easycoder/trunk/plugins/browser.js

    r2118094 r2126294  
    7777                    if (compiler.tokenIs(`to`)) {
    7878                        const cssId = compiler.getNextValue();
     79                        let onError = 0;
     80                        if (compiler.tokenIs(`or`)) {
     81                            compiler.next();
     82                            onError = compiler.getPc() + 1;
     83                            compiler.completeHandler();
     84                        }
    7985                        compiler.addCommand({
    8086                            domain: `browser`,
     
    8389                            type: symbol.keyword,
    8490                            symbol: symbol.name,
    85                             cssId
     91                            cssId,
     92                            onError
    8693                        });
    8794                        return true;
     
    102109            const element = document.getElementById(content);
    103110            if (!element) {
    104                 program.runtimeError(command.lino, `No such element: '${content}'`);
     111                if (command.onError) {
     112                    program.run(command.onError);
     113                } else {
     114                    program.runtimeError(command.lino, `No such element: '${content}'`);
     115                }
    105116                return 0;
    106117            }
  • easycoder/trunk/readme.txt

    r2118094 r2126294  
    5353
    5454== Changelog ==
     55
     56= 2.4.4 21-jul-2019 =
     57* Add 'or' clause to 'attach'
    5558
    5659= 2.4.3 5-jul-2019 =
Note: See TracChangeset for help on using the changeset viewer.