This commit is contained in:
2022-11-21 15:03:05 +01:00
parent 378985b8db
commit b9e038615c
31 changed files with 3848 additions and 12 deletions
@@ -42,8 +42,8 @@ Drupal.behaviors.init_theme.attach = function (context) {
Drupal.behaviors.init_timeline = {};
Drupal.behaviors.init_timeline.attach = function (context) {
$.paScPlayer.defaults.onDomReady = null;
$.paScPlayer.defaults.loadArtworks = 0;
// $.paScPlayer.defaults.onDomReady = null;
// $.paScPlayer.defaults.loadArtworks = 0;
if($('html').is('.oldie'))
{
@@ -1440,12 +1440,18 @@ Drupal.behaviors.init_timeline.attach = function (context) {
var $container = $container || $('body');
var ap = ap || false;
// console.log('_initPaScPlayer');
$.paScPlayer.stopAll();
// $.paScPlayer.stopAll();
var $links = $('a[rel="soundcloud"]', $container);
// console.log('$links', $links);
// // console.log('$links', $links);
if($links.size()){
$links.parents('.field-item').find('span.ext').remove();
$links.paScPlayer({autoplay:ap});
// $links.parents('.field-item').find('span.ext').remove();
// $links.paScPlayer({autoplay:ap});
/* add players for each link */
for ( var i = 0; i < $links.length; i++ ) {
$links[i].parentNode.replaceChild(
SCPurePlayer.create($links[i]), $links[i]
);
}
}
}