Cookies与UserAgent获取 by 治电小白菜
辅助抓取网站登陆后有效Cookies和UserAgent
You'll need Firefox to use this extension
Extension Metadata
Screenshots
About this extension
可通过右键获取当前页面的Cookies和UserAgent
也可通过主页面发送
也可通过主页面发送
window.parent.postMessage({type: 'tab', level: 'main'}, '*');
, 来告知插件主页面ID, 这样在其他页面右键点击发送Cookies和UA到主页面时, 即可将Cookies和UserAgent发送给主页面, 主页面只需要通过mutationObserver监听 id 为 "cookie-block" 的DOM元素变化即可
const cookiesBlock = document.getElementById('cookie-block')
if (!cookiesBlock) return
const config = {
attributes: true,
childList: true,
subtree: true
}
const callback = function(mutationsList, observer) {
for (let mutation of mutationsList) {
if (mutation.type === 'childList') {
console.log(JSON.parse(cookiesBlock.innerText))
}
}
}
const observer = new MutationObserver(callback)
observer.observe(cookiesBlock, config)
Rate your experience
PermissionsLearn more
This add-on needs to:
- Display notifications to you
- Access browser tabs
- Access browser activity during navigation
- Access your data for all websites
More information
- Add-on Links
- Version
- 0.0.3
- Size
- 19.5 KB
- Last updated
- 5 years ago (Sep 30, 2019)
- Related Categories
- License
- Mozilla Public License 2.0
- Version History
Add to collection
More extensions by 治电小白菜
- There are no ratings yet
- There are no ratings yet
- There are no ratings yet
- There are no ratings yet
- There are no ratings yet
- There are no ratings yet