0

晚上,

我的要求是如何让“SCM 音乐播放器”在进入另一个页面时播放单独的(不同的)歌曲。

例如,在 Pg.1 (index.php) 上,我想播放来自 YouTube 的歌曲“The Script - Hall of Fame ft. will.i.am”

在 Pg.2 (second.php) 上,我想播放 YouTube 上的歌曲“The Script - If You Can See Me Now”

但是,当我放置从 index.php 到second.php的超链接时,它会成功重定向,但是 SCM 音乐播放器仍会播放 index.php 中的歌曲,我显然不想要,我希望它播放来自 second.php 的歌曲

如果有人可以帮助我解决此问题,我将不胜感激!

谢谢。

4

1 回答 1

0

好吧,在玩了 script.js 之后,我修复了它。

我 100% 确信这可能不是正确的做法,但是,它确实有效!

方法如下,从“ script.js ”中找到以下内容

                    }else if(filter(tar.href).indexOf(filter(location.host))==-1 ){
                    if(tar.href.match(/^http(s)?/)){
                        //external links
                        window.open(tar.href,'_blank');
                        window.focus();
                        e.preventDefault();
                    }

用。。。来代替

                    }else if(filter(tar.href).indexOf(filter(location.host))==0 ){
                    if(tar.href.match(/^http(s)?/)){
                        //external links
                        window.open(tar.href,'_top');
                        window.focus();
                        e.preventDefault();
                    }

它似乎奏效了!

享受。

于 2013-05-28T15:06:37.377 回答