Plugin Directory

Changeset 2613236


Ignore:
Timestamp:
10/12/2021 07:14:10 PM (4 years ago)
Author:
aspiesoft
Message:

updated

Location:
aspiesoft-auto-embed/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • aspiesoft-auto-embed/trunk/aspiesoft-auto-embed.php

    r2613216 r2613236  
    77Plugin URI: https://github.com/AspieSoft/aspiesoft-auto-embed
    88Description: Easily Embed Dynamic Lazy Loading Youtube Videos Simply By Pasting The Url.
    9 Version: 1.4.8
     9Version: 1.4.9
    1010Author: AspieSoft
    1111Author URI: https://www.aspiesoft.com
  • aspiesoft-auto-embed/trunk/readme.txt

    r2613216 r2613236  
    44Requires at least: 3.0.1
    55Tested up to: 5.8
    6 Stable tag: 1.4.8
     6Stable tag: 1.4.9
    77Requires PHP: 5.2.4
    88License: GPLv2 or later
  • aspiesoft-auto-embed/trunk/src/assets/embed.js

    r2613216 r2613236  
    4848    'popular': '0',
    4949    'live': '0',
     50    'start': null,
     51    'end': null,
    5052
    5153    'ignoreAttrs': ['class', 'id', 'name', 'target'], // optional [array] list of attributes to ignore
     
    494496        if(data.attrs['start'].includes(':')) {
    495497          let time = data.attrs['start'].split(':');
    496           youtubeQueryAttrs += '&start=' + ((Number(time[0]) * 60) + Number(time[1])) + 's';
    497         } else if(!data.attrs['start'].endsWith('s')) {
    498           youtubeQueryAttrs += '&start=' + data.attrs['start'] + 's';
     498          youtubeQueryAttrs += '&start=' + ((Number(time[0]) * 60) + Number(time[1]));
     499        } else if(data.attrs['start'].endsWith('s')) {
     500          youtubeQueryAttrs += '&start=' + data.attrs['start'].replace(/s$/, '');
    499501        } else {
    500502          youtubeQueryAttrs += '&start=' + data.attrs['start'];
     
    504506        if(data.attrs['end'].includes(':')) {
    505507          let time = data.attrs['end'].split(':');
    506           youtubeQueryAttrs += '&end=' + ((Number(time[0]) * 60) + Number(time[1])) + 's';
     508          youtubeQueryAttrs += '&end=' + ((Number(time[0]) * 60) + Number(time[1]));
    507509        } else if(!data.attrs['end'].endsWith('s')) {
    508           youtubeQueryAttrs += '&end=' + data.attrs['end'] + 's';
     510          youtubeQueryAttrs += '&end=' + data.attrs['end'].replace(/s$/, '');
    509511        } else {
    510512          youtubeQueryAttrs += '&end=' + data.attrs['end'];
  • aspiesoft-auto-embed/trunk/src/main.php

    r2613216 r2613236  
    6565        'description' => false, 'desc' => false,
    6666        'start' => false,
    67         'stop' => false,
     67        'end' => false,
    6868      ), $atts);
    6969
     
    100100        'description' => false, 'desc' => false,
    101101        'start' => false,
    102         'stop' => false,
     102        'end' => false,
    103103      ), $atts);
    104104
     
    132132        $this->setQueryAttrBool($attr, 'search', array('search')),
    133133        $this->setQueryAttrValue($attr, 'start', array('start')),
    134         $this->setQueryAttrValue($attr, 'stop', array('stop')),
     134        $this->setQueryAttrValue($attr, 'end', array('end')),
    135135      );
    136136      $queryAttrs = array_filter($queryAttrs);
Note: See TracChangeset for help on using the changeset viewer.