获取和风组件下的所有a标签
//天气预报插件
function insertWeather() {
window.WIDGET = {
"CONFIG": {
"layout": "1",
"city": "CN101050101",
"width": "260",
"height": "130",
"background": "5",
"dataColor": "000000",
"modules": "10",
"key": ""
}
}
const script = document.createElement('script')
script.src = ''
document.body.appendChild(script)
hideElements();
}
function hideElements() {
nextTick(() => {
setTimeout(() => {
var aTagsWithHref = document.querySelectorAll('#he-plugin-standard a[href]')
aTagsWithHref.forEach(function(aTag) {
aTag.addEventListener("click", function(event) {
event.preventDefault();
});
});
}, 500);
});
}