Git Product home page Git Product logo

content-scanner's Introduction

安装

将src文件夹拖放到chrome://extensions/

概念

页面:

页面和页面内的iframe具有同等地位,处理逻辑相同:监听同样的事件;处理同样的数据;iframe的内容不算作包含它的页面内容的一部分。

不考虑两层及以上的iframe嵌套。

浏览历史

对于主页面,打开一次浏览器tab,算作一次浏览。

对于iframe,监听visibilityState事件,document.visibilityState === 'visible'时,算作一次浏览。

对于主页面,监听chrome.tabs.onActivated事件,因为search, hash的修改不会触发visibilityState事件,但chrome.tabs.onActivated会被触发。

页面内容检测

页面内容会在两个事件中监听:'load', 'mutationObsever'。load在页面加载完成后调用一次;mutationObsever会在页面有任何变化时调用。

前端会缓存发送到后端的数据,相同的数据不会发送两遍。

页面的内容不包含页面内iframe中的内容。

但页面切换到后台(如tab切换)时,前端会清空缓存。

content-scanner's People

Watchers

James Cloos avatar xifeiwu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.