Firefox Browser Add-ons
  • Extensions
  • Themes
    • for Firefox
    • Dictionaries & Language Packs
    • Other Browser Sites
    • Add-ons for Android
Log in
Preview of Cookies与UserAgent获取

Cookies与UserAgent获取 by 治电小白菜

辅助抓取网站登陆后有效Cookies和UserAgent

0 (0 reviews)0 (0 reviews)
8 Users8 Users
Download Firefox and get the extension
Download file

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)
Rated 0 by 0 reviewers
Log in to rate this extension
There are no ratings yet

Star rating saved

5
0
4
0
3
0
2
0
1
0
No reviews yet
Permissions and data

Required permissions:

  • Display notifications to you
  • Access browser tabs
  • Access browser activity during navigation
  • Access your data for all websites
Learn more
More information
Add-on Links
  • Homepage
  • Support site
  • Support Email
  • Copy add-on ID
Version
0.0.3
Size
19.5 KB
Last updated
7 years ago (Sep 30, 2019)
Related Categories
  • Web Development
License
Mozilla Public License 2.0
Version History
  • See all versions
Add to collection
Report this add-on
Go to Mozilla's homepage

Add-ons

  • About
  • Firefox Add-ons Blog
  • Extension Workshop
  • Developer Hub
  • Developer Policies
  • Community Blog
  • Forum
  • Report a bug
  • Review Guide

Download

  • Download Firefox
  • Windows
  • macOS
  • iOS
  • Android
  • Linux
  • All

Latest Builds

  • Nightly
  • Beta

Firefox for Business

  • Enterprise

Community

  • Connect
  • Contribute
  • Developer

Follow

  • Instagram
  • YouTube
  • TikTok
  • Bluesky
  • Podcast
  • Privacy
  • Cookies
  • Legal

Except where otherwise noted, content on this site is licensed under the Creative Commons Attribution Share-Alike License v3.0 or any later version.