修复回复之类的位置变化
This commit is contained in:
parent
ae211c0bd8
commit
119f0b6274
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name tieba page
|
// @name tieba page
|
||||||
// @namespace https://github.com/fthvgb1/tampermonkey-script
|
// @namespace https://github.com/fthvgb1/tampermonkey-script
|
||||||
// @version 0.97
|
// @version 0.98
|
||||||
// @author fthvgb1
|
// @author fthvgb1
|
||||||
// @match https://tieba.baidu.com/*
|
// @match https://tieba.baidu.com/*
|
||||||
// @match https://tiebac.baidu.com/*
|
// @match https://tiebac.baidu.com/*
|
||||||
@ -405,11 +405,29 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function god() {
|
||||||
|
let targetNode = document.querySelector("#glob");
|
||||||
|
let MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
|
||||||
|
let observer = new MutationObserver((mutations) => {
|
||||||
|
let m = mutations[0];
|
||||||
|
if (m.type === 'attributes' && m.attributeName === 'style' && m.target.style.display === 'none') {
|
||||||
|
m.target.style.display = 'block';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let observerOptions = {
|
||||||
|
attributes: true,
|
||||||
|
attributeFilter: ['style']
|
||||||
|
};
|
||||||
|
observer.observe(targetNode, observerOptions);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function detail() {
|
function detail() {
|
||||||
|
|
||||||
|
god();
|
||||||
document.querySelector('a[class="ui_button ui_back j_span_back"]').addEventListener('click', event => {
|
document.querySelector('a[class="ui_button ui_back j_span_back"]').addEventListener('click', event => {
|
||||||
obs.src = obs.dataset.ss
|
obs.src = obs.dataset.ss
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user