Skip to content

Commit

Permalink
- Fix setting for allowFullScreen
Browse files Browse the repository at this point in the history
- Don't need to parse new lines and spaces

Signed-off-by: Michel Mendiola <suki@missallsunday.com>
  • Loading branch information
MissAllSunday committed Dec 18, 2023
1 parent a1a3cc8 commit 6395c06
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion OharaYTEmbed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<modification xmlns="https://www.simplemachines.org/xml/modification" xmlns:smf="https://www.simplemachines.org/">
<id>Suki:ohara_youtube_embed</id>
<version>1.2.14</version>
<version>1.2.15</version>

<file name="$sourcedir/Post.php">
<operation>
Expand Down
10 changes: 3 additions & 7 deletions Sources/OharaYTEmbed.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
* @package Ohara Youtube Embed mod
* @version 1.2.14
* @version 1.2.15
* @author Michel Mendiola <suki@missallsunday.com>
* @copyright Copyright (C) 2023 Michel Mendiola
* @license http://www.mozilla.org/MPL/ MPL 2.0
Expand Down Expand Up @@ -175,18 +175,14 @@ function OYTE_Main($data)
// Got something!
else
$result = '
<div class="oharaEmbed youtube" id="oh_'. $videoID .'">
<noscript>
<a href="https://youtube.com/watch?v='. $videoID .'">https://youtube.com/watch?v='. $videoID . '</a>
</noscript>
</div>';
<div class="oharaEmbed youtube" id="oh_'. $videoID .'"><noscript><a href="https://youtube.com/watch?v='. $videoID .'">https://youtube.com/watch?v='. $videoID . '</a></noscript></div>';

return $result;
}

function OYTE_Vimeo($data)
{
global $modSettings, $txt, $sourcedir;
global $modSettings, $txt;

if (empty($data) || empty($modSettings['OYTE_master']))
return sprintf($txt['OYTE_unvalid_link'], 'vimeo');
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/OharaYTEmbed.english-utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
* @package Ohara Youtube Embed mod
* @version 1.2.14
* @version 1.2.15
* @author Michel Mendiola <suki@missallsunday.com>
* @copyright Copyright (C) 2022 Michel Mendiola
* @license http://www.mozilla.org/MPL/ MPL 2.0
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/OharaYTEmbed.polish.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
* @package Ohara Youtube Embed mod
* @version 1.2.14
* @version 1.2.15
* @author Michel Mendiola <suki@missallsunday.com>
* @copyright Copyright (C) 2022 Michel Mendiola
* @license http://www.mozilla.org/MPL/ MPL 2.0
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/OharaYTEmbed.spanish_es-utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
* @package Ohara Youtube Embed mod
* @version 1.2.14
* @version 1.2.15
* @author Michel Mendiola <suki@missallsunday.com>
* @copyright Copyright (C) 2022 Michel Mendiola
* @license http://www.mozilla.org/MPL/ MPL 2.0
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/OharaYTEmbed.spanish_es.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
* @package Ohara Youtube Embed mod
* @version 1.2.14
* @version 1.2.15
* @author Michel Mendiola <suki@missallsunday.com>
* @copyright Copyright (C) 2022 Michel Mendiola
* @license http://www.mozilla.org/MPL/ MPL 2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
* @package Ohara Youtube Embed mod
* @version 1.2.14
* @version 1.2.15
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (C) 2020 Jessica González
* @license http://www.mozilla.org/MPL/ MPL 2.0
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/OharaYTEmbed.spanish_latin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
* @package Ohara Youtube Embed mod
* @version 1.2.14
* @version 1.2.15
* @author Michel Mendiola <suki@missallsunday.com>
* @copyright Copyright (C) 2022 Michel Mendiola
* @license http://www.mozilla.org/MPL/ MPL 2.0
Expand Down
6 changes: 3 additions & 3 deletions Themes/default/scripts/ohyoutube.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2022 Michel Mendiola
@license http://www.mozilla.org/MPL/ MPL 2.0
@version 1.2.13
@version 1.2.15
*/

class OharaYouTubeEmbed {
Expand Down Expand Up @@ -42,11 +42,11 @@ class OharaYouTubeEmbed {
addIframe(element) {
let iframe = document.createElement('iframe')

let iframeUrl = '//www.youtube.com/embed/' + element.videoID + '?autoplay=1&autohide=1';
let iframeUrl = 'https://www.youtube.com/embed/' + element.videoID + '?autoplay=1&autohide=1';

iframe.frameBorder = '0'
iframe.src = iframeUrl
iframe.allowfullscreen = 'allowfullscreen'
iframe.setAttribute('allowFullScreen', '')

element.append(iframe)
}
Expand Down
2 changes: 1 addition & 1 deletion addHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
* @package Ohara Youtube Embed mod
* @version 1.2.14
* @version 1.2.15
* @author Michel Mendiola <suki@missallsunday.com>
* @copyright Copyright (C) 2022 Michel Mendiola
* @license http://www.mozilla.org/MPL/ MPL 2.0
Expand Down
2 changes: 1 addition & 1 deletion package-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<name>Ohara YouTube Embed</name>
<id>Suki:ohara_youtube_embed</id>
<version>1.2.14</version>
<version>1.2.15</version>
<type>modification</type>

<install for="2.0 - 2.0.99">
Expand Down
5 changes: 5 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.

[color=purple][b][size=12pt]Changelog[/size][/b][/color]
[code]
1.2.15 - Dec 18, 2023
- Fix setting for allowFullScreen
- Don't need to parse new lines and spaces
- Add phpunit tests

1.2.14 - May 06, 2023
- Remove imgur support
- Fix correctly displaying smileys after posting a video
Expand Down

0 comments on commit 6395c06

Please sign in to comment.