gpt4 book ai didi

elementor - 我可以从 Elementor 中视频播放列表生成的 URL 中删除参数吗

转载 作者:行者123 更新时间:2023-12-04 07:29:00 33 4
gpt4 key购买 nike

Elementor Pro 有一个新的小部件,视频播放列表。它将参数附加到 URL,如下所示:http://aaronpenton.net/ampcreative/vip/about-vip/?playlist=f68425e&video=b8a9967
这对于 SEO 和 UX 来说显然很糟糕。有没有办法删除 ?playlist=f68425e&video=b8a9967 ?

最佳答案

我的兄弟帮我写下一个脚本。
使用以下内容放置“HTML Elementor Widget”:

    <script>
function getURLParameter(name) {
return decodeURI((RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]);
}

function hideURLParams() {
//Parameters to hide (ie ?playlist=value, ?video=value, etc)
var hide = ['playlist','video'];
for(var h in hide) {
if(getURLParameter(h)) {
history.replaceState(null, document.getElementsByTagName("title")[0].innerHTML, window.location.pathname);
}
}
}

window.onload = hideURLParams;
</script>

关于elementor - 我可以从 Elementor 中视频播放列表生成的 URL 中删除参数吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68057948/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com