1、网页中单击鼠标右键,选择“检查(元素)”,或直接按F12,
2、切换到控制台
3、在控制台输入下面的代码
document.querySelectorAll('body *').forEach(function(node) {
if (['fixed', 'sticky'].includes(getComputedStyle(node).position)) {
node.parentNode.removeChild(node);
}
});
// 原理:获取body下的所有元素,判断元素定位为fixed和sticky的移除元素。
回车,即可去除悬挂的广告。