├── .babelrc ├── .gitignore ├── LICENSE ├── README.md ├── build ├── .DS_Store ├── chrome │ ├── manifest.json │ ├── scripts │ │ ├── background.js │ │ ├── contentscript.js │ │ ├── livereload.js │ │ └── options.js │ └── styles │ │ ├── options.css │ │ └── popup.css ├── firefox │ ├── _locales │ │ └── en │ │ │ └── messages.json │ ├── icons │ │ ├── icon-128.png │ │ ├── icon-16.png │ │ ├── icon-19.png │ │ ├── icon-38.png │ │ └── icon-64.png │ ├── manifest.json │ ├── options.html │ ├── popup.html │ ├── scripts │ │ ├── background.js │ │ ├── contentscript.js │ │ ├── livereload.js │ │ ├── options.js │ │ └── popup.js │ └── styles │ │ ├── options.css │ │ └── popup.css └── opera │ ├── manifest.json │ ├── scripts │ ├── background.js │ ├── contentscript.js │ ├── livereload.js │ └── options.js │ └── styles │ ├── options.css │ └── popup.css ├── config ├── chrome.json ├── development.json ├── firefox.json ├── opera.json └── production.json ├── googleea4f71f894b7827d.html ├── gulpfile.babel.js ├── images ├── 1.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png └── 8.png ├── manifest.json ├── package.json ├── resources ├── chrome-promo │ ├── large.png │ ├── marquee.png │ └── small.png └── extension-assets.sketch └── src ├── .DS_Store ├── _locales └── en │ └── messages.json ├── font ├── .DS_Store ├── iconfont.ttf ├── iconfont.woff └── iconfont.woff2 ├── icons ├── icon-128.png ├── icon-16.png ├── icon-19.png ├── icon-38.png └── icon-64.png ├── images ├── .gitkeep ├── chrome │ └── .gitkeep ├── firefox │ └── .gitkeep ├── opera │ └── .gitkeep └── shared │ └── .gitkeep ├── jquery └── jquery-3.4.1.js ├── layer ├── .DS_Store ├── layer.js ├── mobile │ ├── .DS_Store │ ├── layer.js │ └── need │ │ └── layer.css └── theme │ ├── .DS_Store │ └── default │ ├── icon-ext.png │ ├── icon.png │ ├── layer.css │ ├── loading-0.gif │ ├── loading-1.gif │ └── loading-2.gif ├── options.html ├── popup.html ├── scripts ├── background.js ├── contentscript.js ├── livereload.js ├── options.js ├── popup.js └── utils │ ├── ext.js │ └── storage.js └── styles ├── layui.scss ├── modules ├── _grid.scss ├── _layout.scss ├── _reset.scss ├── _utilities.scss └── _variables.scss ├── options.scss └── popup.scss /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"], 3 | "plugins": ["transform-decorators-legacy"] 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .DS_Store 3 | package-lock.json 4 | # Logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | yarn-debug.log* 9 | yarn-error.log* 10 | lerna-debug.log* 11 | dist/ 12 | build/ 13 | 14 | # Diagnostic reports (https://nodejs.org/api/report.html) 15 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 16 | 17 | # Runtime data 18 | pids 19 | *.pid 20 | *.seed 21 | *.pid.lock 22 | 23 | # Directory for instrumented libs generated by jscoverage/JSCover 24 | lib-cov 25 | 26 | # Coverage directory used by tools like istanbul 27 | coverage 28 | *.lcov 29 | 30 | # nyc test coverage 31 | .nyc_output 32 | 33 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 34 | .grunt 35 | 36 | # Bower dependency directory (https://bower.io/) 37 | bower_components 38 | 39 | # node-waf configuration 40 | .lock-wscript 41 | 42 | # Compiled binary addons (https://nodejs.org/api/addons.html) 43 | build/Release 44 | 45 | # Dependency directories 46 | node_modules/ 47 | jspm_packages/ 48 | 49 | # TypeScript v1 declaration files 50 | typings/ 51 | 52 | # TypeScript cache 53 | *.tsbuildinfo 54 | 55 | # Optional npm cache directory 56 | .npm 57 | 58 | # Optional eslint cache 59 | .eslintcache 60 | 61 | # Microbundle cache 62 | .rpt2_cache/ 63 | .rts2_cache_cjs/ 64 | .rts2_cache_es/ 65 | .rts2_cache_umd/ 66 | 67 | # Optional REPL history 68 | .node_repl_history 69 | 70 | # Output of 'npm pack' 71 | *.tgz 72 | 73 | # Yarn Integrity file 74 | .yarn-integrity 75 | 76 | # dotenv environment variables file 77 | .env 78 | .env.test 79 | 80 | # parcel-bundler cache (https://parceljs.org/) 81 | .cache 82 | 83 | # Next.js build output 84 | .next 85 | 86 | # Nuxt.js build / generate output 87 | .nuxt 88 | dist 89 | 90 | # Gatsby files 91 | .cache/ 92 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 93 | # https://nextjs.org/blog/next-9-1#public-directory-support 94 | # public 95 | 96 | # vuepress build output 97 | .vuepress/dist 98 | 99 | # Serverless directories 100 | .serverless/ 101 | 102 | # FuseBox cache 103 | .fusebox/ 104 | 105 | # DynamoDB Local files 106 | .dynamodb/ 107 | 108 | # TernJS port file 109 | .tern-port 110 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [2020] [fofapro and r4v3zn] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FOFA Pro view 2 | 3 | FOFA Pro view 是一款FOFA Pro 资产展示浏览器插件,目前兼容[Chrome](https://www.google.com/chrome/)、[Firefox](https://www.mozilla.org/)、[Opera](https://www.opera.com/)。 4 | 5 | The Fofa Pro View plugin tells you where the website is hosted (country, city), who owns the IP and what other services/ ports are open. 6 | 7 | The Fofa Pro View plugin for Chrome automatically checks whether Fofa Pro has any information for the current website. Is the website also running FTP, DNS, SSH or some unusual service? With this plugin you can see all the info that Fofa Pro has collected on a given website/ domain. 8 | 9 | 项目地址:https://github.com/fofapro/fofa_view 10 | 11 | **使用插件前,请确保 fofa.info 处于登陆状态** 12 | 13 | ## 安装 14 | 15 | ![](images/1.png) 16 | 17 | ### Chrome 18 | 19 | #### 手动安装 20 | 21 | 下载版本:https://github.com/fofapro/fofa_view/releases 22 | 23 | ![](images/3.png) 24 | 25 | ![](images/4.png) 26 | 27 | 解压插件压缩包,打开 [chrome://extensions/](chrome://extensions/) 并且开启开发者模式,点击 `加载已解压的扩展程序` 选择已经解压的插件目录进行加载。 28 | 29 | #### 商城安装 30 | 31 | ![](images/8.png) 32 | 33 | ### FireFox 34 | 35 | #### 手动安装 36 | 37 | 下载版本:https://github.com/fofapro/fofa_view/releases 38 | 39 | ![](images/6.png) 40 | 41 | 解压插件压缩包,打开 [about:debugging#/runtime/this-firefox](about:debugging#/runtime/this-firefox) 点击`临时载入附加组件…`选择下载的插件压缩包。 42 | 43 | #### 商城安装 44 | 45 | ![](images/7.png) 46 | 47 | ## 更新日志 48 | 49 | 2022-02-17 50 | 51 | - 优化:修复 FOFA Pro 无法访问 52 | 53 | 2021-04-02 54 | 55 | - 优化:对接新版FOFA Pro 56 | - 新增:加入蜜罐识别 57 | 58 | 2020-07-18 59 | 60 | - 优化:对接新版FOFA Pro 61 | - 优化:协议、端口图标 62 | - 新增:IP 所属组织、ASN 63 | - 新增:IP C段查询 64 | 65 | 2019-01-04 66 | 67 | - 优化:面板上面文字无法直接复制(如ip地址),建议让文字可选取,增加使用便利性 68 | 69 | - 优化:刷新确认按钮第一次打开有半截藏在屏幕里点不到 70 | 71 | - 优化:网络加载较慢导致样式、图标加载失败问题 72 | 73 | - 新增:表格Host字段 74 | 75 | 2019-12-31 76 | 77 | - Chrome、Firefox可在商城直接搜索安装 78 | 79 | 2019-12-29 80 | 81 | - 添加IP位置信息 82 | - 添加资产信息 83 | -------------------------------------------------------------------------------- /build/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/build/.DS_Store -------------------------------------------------------------------------------- /build/chrome/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FOFA Pro View", 3 | "version": "0.0.5", 4 | "manifest_version": 2, 5 | "description": "FOFA Pro view ", 6 | "icons": { 7 | "16": "icons/icon-16.png", 8 | "128": "icons/icon-128.png" 9 | }, 10 | "default_locale": "en", 11 | "background": { 12 | "scripts": [ 13 | "scripts/livereload.js", 14 | "scripts/background.js" 15 | ] 16 | }, 17 | "permissions": [ 18 | "tabs", 19 | "storage", 20 | "http://*/*", 21 | "https://*/*" 22 | ], 23 | "content_scripts": [ 24 | { 25 | "matches": [ 26 | "http://*/*", 27 | "https://*/*" 28 | ], 29 | "js": [ 30 | "scripts/contentscript.js" 31 | ], 32 | "run_at": "document_end", 33 | "all_frames": false 34 | } 35 | ], 36 | "browser_action": { 37 | "default_icon": { 38 | "19": "icons/icon-19.png", 39 | "38": "icons/icon-38.png" 40 | }, 41 | "default_title": "FOFA Pro view", 42 | "default_popup": "popup.html" 43 | } 44 | } -------------------------------------------------------------------------------- /build/chrome/scripts/background.js: -------------------------------------------------------------------------------- 1 | (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i .unit { 129 | padding-top: 0; 130 | } 131 | 132 | .unit .grid:last-child > .unit { 133 | padding-bottom: 0; 134 | } 135 | 136 | /* Let people nuke the gutters/padding completely in a couple of ways */ 137 | .no-gutters .unit, 138 | .unit.no-gutters { 139 | padding: 0 !important; 140 | } 141 | 142 | /* Wrapping at a maximum width is optional */ 143 | .wrap .grid, 144 | .grid.wrap { 145 | max-width: 978px; 146 | margin: 0 auto; 147 | } 148 | 149 | /* Width classes also have shorthand versions numbered as fractions 150 | * For example: for a grid unit 1/3 (one third) of the parent width, 151 | * simply apply class="w-1-3" to the element. */ 152 | .grid .whole, .grid .w-1-1 { 153 | width: 100%; 154 | } 155 | 156 | .grid .half, .grid .w-1-2 { 157 | width: 50%; 158 | } 159 | 160 | .grid .one-third, .grid .w-1-3 { 161 | width: 33.3332%; 162 | } 163 | 164 | .grid .two-thirds, .grid .w-2-3 { 165 | width: 66.6665%; 166 | } 167 | 168 | .grid .one-quarter, 169 | .grid .one-fourth, .grid .w-1-4 { 170 | width: 25%; 171 | } 172 | 173 | .grid .three-quarters, 174 | .grid .three-fourths, .grid .w-3-4 { 175 | width: 75%; 176 | } 177 | 178 | .grid .one-fifth, .grid .w-1-5 { 179 | width: 20%; 180 | } 181 | 182 | .grid .two-fifths, .grid .w-2-5 { 183 | width: 40%; 184 | } 185 | 186 | .grid .three-fifths, .grid .w-3-5 { 187 | width: 60%; 188 | } 189 | 190 | .grid .four-fifths, .grid .w-4-5 { 191 | width: 80%; 192 | } 193 | 194 | .grid .golden-small, .grid .w-g-s { 195 | width: 38.2716%; 196 | } 197 | 198 | /* Golden section: smaller piece */ 199 | .grid .golden-large, .grid .w-g-l { 200 | width: 61.7283%; 201 | } 202 | 203 | /* Golden section: larger piece */ 204 | /* Clearfix after every .grid */ 205 | .grid { 206 | *zoom: 1; 207 | } 208 | 209 | .grid:before, .grid:after { 210 | display: table; 211 | content: ""; 212 | line-height: 0; 213 | } 214 | 215 | .grid:after { 216 | clear: both; 217 | } 218 | 219 | /* Utility classes */ 220 | .align-center { 221 | text-align: center; 222 | } 223 | 224 | .align-left { 225 | text-align: left; 226 | } 227 | 228 | .align-right { 229 | text-align: right; 230 | } 231 | 232 | .pull-left { 233 | float: left; 234 | } 235 | 236 | .pull-right { 237 | float: right; 238 | } 239 | 240 | /* A property for a better rendering of images in units: in 241 | this way bigger pictures are just resized if the unit 242 | becomes smaller */ 243 | .unit img { 244 | max-width: 100%; 245 | } 246 | 247 | /* Hide elements using this class by default */ 248 | .only-on-mobiles { 249 | display: none !important; 250 | } 251 | 252 | /* Responsive Stuff */ 253 | @media screen and (max-width: 568px) { 254 | /* Stack anything that isn't full-width on smaller screens 255 | and doesn't provide the no-stacking-on-mobiles class */ 256 | .grid:not(.no-stacking-on-mobiles) > .unit { 257 | width: 100% !important; 258 | padding-left: 20px; 259 | padding-right: 20px; 260 | } 261 | .unit .grid .unit { 262 | padding-left: 0px; 263 | padding-right: 0px; 264 | } 265 | /* Sometimes, you just want to be different on small screens */ 266 | .center-on-mobiles { 267 | text-align: center !important; 268 | } 269 | .hide-on-mobiles { 270 | display: none !important; 271 | } 272 | .only-on-mobiles { 273 | display: block !important; 274 | } 275 | } 276 | 277 | /* Expand the wrap a bit further on larger screens */ 278 | @media screen and (min-width: 1180px) { 279 | .wider .grid, 280 | .grid.wider { 281 | max-width: 1180px; 282 | margin: 0 auto; 283 | } 284 | } 285 | 286 | html, body { 287 | box-sizing: border-box; 288 | } 289 | 290 | html:before, html:after, body:before, body:after { 291 | box-sizing: border-box; 292 | } 293 | 294 | body { 295 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 296 | line-height: 1.5; 297 | font-size: 16px; 298 | color: #111111; 299 | font-weight: normal; 300 | } 301 | 302 | h1, h2, h3, h4, h5, h6 { 303 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 304 | font-weight: 500; 305 | line-height: 1.1; 306 | margin: 0; 307 | padding: 0; 308 | } 309 | 310 | h1 { 311 | font-size: 1.75em; 312 | } 313 | 314 | h2 { 315 | font-size: 1.5em; 316 | } 317 | 318 | h3 { 319 | font-size: 1.25em; 320 | } 321 | 322 | h4 { 323 | font-size: 1.10em; 324 | } 325 | 326 | h5 { 327 | font-size: 1em; 328 | } 329 | 330 | h6 { 331 | font-size: .85em; 332 | } 333 | 334 | nav { 335 | margin: 1em 0; 336 | } 337 | 338 | nav ul { 339 | list-style: none; 340 | margin: 0; 341 | padding: 0; 342 | } 343 | 344 | nav ul li { 345 | display: inline-block; 346 | margin-right: 1em; 347 | margin-bottom: .25em; 348 | } 349 | 350 | a { 351 | text-decoration: none; 352 | color: #4990E2; 353 | } 354 | 355 | a:hover, a:focus { 356 | color: #2e7fde; 357 | } 358 | 359 | ul, ol { 360 | margin-top: 0; 361 | padding-top: 0; 362 | padding-left: 2.5em; 363 | } 364 | 365 | p { 366 | margin: 1em 0; 367 | hyphens: auto; 368 | } 369 | 370 | p.lead { 371 | font-size: 1.2em; 372 | } 373 | 374 | p:first-child { 375 | margin-top: 0; 376 | } 377 | 378 | p:last-child { 379 | margin-bottom: 0; 380 | } 381 | 382 | p + ul, p + ol { 383 | margin-top: -.75em; 384 | } 385 | 386 | dd { 387 | margin-bottom: 1em; 388 | margin-left: 0; 389 | padding-left: 2.5em; 390 | } 391 | 392 | dt { 393 | font-weight: 700; 394 | } 395 | 396 | blockquote { 397 | margin: 0; 398 | padding-left: 2.5em; 399 | } 400 | 401 | .text-muted { 402 | color: #7A7A7A; 403 | } 404 | 405 | .text-center { 406 | text-align: center; 407 | } 408 | 409 | .heading { 410 | margin: 1em auto; 411 | padding-bottom: 1em; 412 | border-bottom: 1px solid #eee; 413 | } 414 | 415 | .heading h1 + .lead { 416 | margin-top: 0.2em; 417 | } 418 | 419 | .content { 420 | min-height: 300px; 421 | } 422 | 423 | .option { 424 | margin: 1em auto; 425 | } 426 | 427 | .option h5 { 428 | margin-bottom: 1em; 429 | } 430 | 431 | .option .radio-group label { 432 | display: block; 433 | } 434 | 435 | .option .radio-group input[type="radio"] { 436 | display: inline-block; 437 | margin: 3px 5px; 438 | } 439 | -------------------------------------------------------------------------------- /build/chrome/styles/popup.css: -------------------------------------------------------------------------------- 1 | /* 2 | App reset by Ben Frain @benfrain / benfrain.com 3 | Slightly modified by Bharani @bharani91 / github.com/bharani91 4 | */ 5 | /*Hat tip to @thierrykoblentz for this approach: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */ 6 | html { 7 | box-sizing: border-box; 8 | } 9 | 10 | * { 11 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0); 12 | -webkit-tap-highlight-color: transparent; 13 | box-sizing: inherit; 14 | } 15 | 16 | *:before, 17 | *:after { 18 | box-sizing: inherit; 19 | } 20 | 21 | input[type], 22 | [contenteditable] { 23 | user-select: text; 24 | } 25 | 26 | body, 27 | h1, 28 | h2, 29 | h3, 30 | h4, 31 | h5, 32 | h6, 33 | p { 34 | margin: 0; 35 | font-size: 1rem; 36 | font-weight: 400; 37 | } 38 | 39 | a { 40 | text-decoration: none; 41 | color: inherit; 42 | } 43 | 44 | /*IMPORTANT: This removes the focus outline for most browsers. Be aware this is a backwards accessibilty step! Mozilla (i.e. Firefox) also adds a dotted outline around a tags and buttons when they receive tab focus which I haven't found an unhacky way of removing.*/ 45 | a:focus, 46 | button:focus { 47 | outline: 0; 48 | } 49 | 50 | button { 51 | appearance: none; 52 | background-color: transparent; 53 | border: 0; 54 | padding: 0; 55 | } 56 | 57 | input, 58 | fieldset { 59 | appearance: none; 60 | border: 0; 61 | padding: 0; 62 | margin: 0; 63 | min-width: 0; 64 | font-size: 1rem; 65 | font-family: inherit; 66 | } 67 | 68 | /*This switches the default outline off when an input receives focus (really important for users tabbing through with a keyboard) so ensure you put something decent in for your input focus instead!!*/ 69 | input:focus { 70 | outline: 0; 71 | } 72 | 73 | img { 74 | max-width: 100%; 75 | display: block; 76 | } 77 | 78 | /*Removes the default focusring that Mozilla places on select items. From: http://stackoverflow.com/a/18853002/1147859 79 | Ensure you set `#000` to the colour you want your text to appear */ 80 | select:-moz-focusring { 81 | color: transparent; 82 | text-shadow: 0 0 0 #000; 83 | } 84 | 85 | html, body { 86 | box-sizing: border-box; 87 | } 88 | 89 | html:before, html:after, body:before, body:after { 90 | box-sizing: border-box; 91 | } 92 | 93 | body { 94 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 95 | line-height: 1.5; 96 | font-size: 16px; 97 | color: #111111; 98 | font-weight: normal; 99 | } 100 | 101 | h1, h2, h3, h4, h5, h6 { 102 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 103 | font-weight: 500; 104 | line-height: 1.1; 105 | margin: 0; 106 | padding: 0; 107 | } 108 | 109 | h1 { 110 | font-size: 1.75em; 111 | } 112 | 113 | h2 { 114 | font-size: 1.5em; 115 | } 116 | 117 | h3 { 118 | font-size: 1.25em; 119 | } 120 | 121 | h4 { 122 | font-size: 1.10em; 123 | } 124 | 125 | h5 { 126 | font-size: 1em; 127 | } 128 | 129 | h6 { 130 | font-size: .85em; 131 | } 132 | 133 | nav { 134 | margin: 1em 0; 135 | } 136 | 137 | nav ul { 138 | list-style: none; 139 | margin: 0; 140 | padding: 0; 141 | } 142 | 143 | nav ul li { 144 | display: inline-block; 145 | margin-right: 1em; 146 | margin-bottom: .25em; 147 | } 148 | 149 | a { 150 | text-decoration: none; 151 | color: #4990E2; 152 | } 153 | 154 | a:hover, a:focus { 155 | color: #2e7fde; 156 | } 157 | 158 | ul, ol { 159 | margin-top: 0; 160 | padding-top: 0; 161 | padding-left: 2.5em; 162 | } 163 | 164 | p { 165 | margin: 1em 0; 166 | hyphens: auto; 167 | } 168 | 169 | p.lead { 170 | font-size: 1.2em; 171 | } 172 | 173 | p:first-child { 174 | margin-top: 0; 175 | } 176 | 177 | p:last-child { 178 | margin-bottom: 0; 179 | } 180 | 181 | p + ul, p + ol { 182 | margin-top: -.75em; 183 | } 184 | 185 | dd { 186 | margin-bottom: 1em; 187 | margin-left: 0; 188 | padding-left: 2.5em; 189 | } 190 | 191 | dt { 192 | font-weight: 700; 193 | } 194 | 195 | blockquote { 196 | margin: 0; 197 | padding-left: 2.5em; 198 | } 199 | 200 | body, html { 201 | padding: 0; 202 | margin: 0; 203 | } 204 | 205 | #app { 206 | padding: 20px 20px; 207 | background: #ffffff; 208 | } 209 | 210 | footer { 211 | color: #7A7A7A; 212 | text-align: right; 213 | font-size: 0.8em; 214 | } 215 | 216 | footer a { 217 | outline: none; 218 | color: #949494; 219 | } 220 | 221 | footer a:hover { 222 | color: #7A7A7A; 223 | } 224 | 225 | .popup-content { 226 | min-width: 600px; 227 | min-height: 100%; 228 | max-width: 1000px; 229 | } 230 | 231 | .app-name { 232 | font-size: 14px; 233 | color: #7A7A7A; 234 | text-align: left; 235 | margin: 0 auto 1em auto; 236 | padding: 0; 237 | } 238 | 239 | .site-description { 240 | padding: 0.5em; 241 | border: 1px solid #eeeeee; 242 | margin: 0; 243 | } 244 | 245 | .site-description h3 { 246 | margin: 0; 247 | padding: 0; 248 | border-bottom: 1px solid #eeeeee; 249 | padding-bottom: 0.5em; 250 | } 251 | 252 | .site-description .description { 253 | color: #7A7A7A; 254 | max-height: 100px; 255 | font-size: 0.8em; 256 | line-height: 1.2; 257 | margin-top: 10px; 258 | } 259 | 260 | .site-description .url { 261 | outline: none; 262 | text-decoration: none; 263 | line-height: 1.2; 264 | font-size: 0.8em; 265 | word-break: break-word; 266 | display: block; 267 | } 268 | 269 | .action-container { 270 | margin: 1em auto; 271 | } 272 | 273 | .btn { 274 | background: none; 275 | border: none; 276 | display: inline-block; 277 | cursor: pointer; 278 | padding: 0.5em 1.5em; 279 | background: #4990E2; 280 | color: #ffffff; 281 | font-weight: 500; 282 | border-radius: 2px; 283 | outline: none; 284 | font-size: 1em; 285 | } 286 | -------------------------------------------------------------------------------- /build/firefox/_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "Ext Starter", 4 | "description": "The name of the extension." 5 | }, 6 | "appDescription": { 7 | "message": "Boilerplate for building cross browser extensions", 8 | "description": "The description of the extension." 9 | }, 10 | "btnTooltip": { 11 | "message": "Ext Starter", 12 | "description": "Tooltip for the button." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /build/firefox/icons/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/build/firefox/icons/icon-128.png -------------------------------------------------------------------------------- /build/firefox/icons/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/build/firefox/icons/icon-16.png -------------------------------------------------------------------------------- /build/firefox/icons/icon-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/build/firefox/icons/icon-19.png -------------------------------------------------------------------------------- /build/firefox/icons/icon-38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/build/firefox/icons/icon-38.png -------------------------------------------------------------------------------- /build/firefox/icons/icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/build/firefox/icons/icon-64.png -------------------------------------------------------------------------------- /build/firefox/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FOFA Pro View", 3 | "version": "0.0.5", 4 | "manifest_version": 2, 5 | "description": "FOFA Pro view ", 6 | "icons": { 7 | "16": "icons/icon-16.png", 8 | "128": "icons/icon-128.png" 9 | }, 10 | "default_locale": "en", 11 | "background": { 12 | "scripts": [ 13 | "scripts/livereload.js", 14 | "scripts/background.js" 15 | ] 16 | }, 17 | "permissions": [ 18 | "tabs", 19 | "storage", 20 | "http://*/*", 21 | "https://*/*" 22 | ], 23 | "content_scripts": [ 24 | { 25 | "matches": [ 26 | "http://*/*", 27 | "https://*/*" 28 | ], 29 | "js": [ 30 | "scripts/contentscript.js" 31 | ], 32 | "run_at": "document_end", 33 | "all_frames": false 34 | } 35 | ], 36 | "browser_action": { 37 | "default_icon": { 38 | "19": "icons/icon-19.png", 39 | "38": "icons/icon-38.png" 40 | }, 41 | "default_title": "FOFA Pro view", 42 | "default_popup": "popup.html" 43 | }, 44 | "applications": { 45 | "gecko": { 46 | "id": "woo0nise@gmail.com" 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /build/firefox/options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Options & Settings 8 | 9 | 10 |
11 |
12 |
13 |

Extension Boilerplate

14 |

A foundation for creating cross-browser extensions

15 |
16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 |
Popup color
24 |
25 | 26 | 27 | 28 |
29 |
30 | 31 |
32 | ...display your extensions' options here... 33 |
34 | 35 |
36 |
37 |
38 | 39 | 40 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /build/firefox/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 25 | 26 | 27 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /build/firefox/scripts/background.js: -------------------------------------------------------------------------------- 1 | (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i .unit { 129 | padding-top: 0; 130 | } 131 | 132 | .unit .grid:last-child > .unit { 133 | padding-bottom: 0; 134 | } 135 | 136 | /* Let people nuke the gutters/padding completely in a couple of ways */ 137 | .no-gutters .unit, 138 | .unit.no-gutters { 139 | padding: 0 !important; 140 | } 141 | 142 | /* Wrapping at a maximum width is optional */ 143 | .wrap .grid, 144 | .grid.wrap { 145 | max-width: 978px; 146 | margin: 0 auto; 147 | } 148 | 149 | /* Width classes also have shorthand versions numbered as fractions 150 | * For example: for a grid unit 1/3 (one third) of the parent width, 151 | * simply apply class="w-1-3" to the element. */ 152 | .grid .whole, .grid .w-1-1 { 153 | width: 100%; 154 | } 155 | 156 | .grid .half, .grid .w-1-2 { 157 | width: 50%; 158 | } 159 | 160 | .grid .one-third, .grid .w-1-3 { 161 | width: 33.3332%; 162 | } 163 | 164 | .grid .two-thirds, .grid .w-2-3 { 165 | width: 66.6665%; 166 | } 167 | 168 | .grid .one-quarter, 169 | .grid .one-fourth, .grid .w-1-4 { 170 | width: 25%; 171 | } 172 | 173 | .grid .three-quarters, 174 | .grid .three-fourths, .grid .w-3-4 { 175 | width: 75%; 176 | } 177 | 178 | .grid .one-fifth, .grid .w-1-5 { 179 | width: 20%; 180 | } 181 | 182 | .grid .two-fifths, .grid .w-2-5 { 183 | width: 40%; 184 | } 185 | 186 | .grid .three-fifths, .grid .w-3-5 { 187 | width: 60%; 188 | } 189 | 190 | .grid .four-fifths, .grid .w-4-5 { 191 | width: 80%; 192 | } 193 | 194 | .grid .golden-small, .grid .w-g-s { 195 | width: 38.2716%; 196 | } 197 | 198 | /* Golden section: smaller piece */ 199 | .grid .golden-large, .grid .w-g-l { 200 | width: 61.7283%; 201 | } 202 | 203 | /* Golden section: larger piece */ 204 | /* Clearfix after every .grid */ 205 | .grid { 206 | *zoom: 1; 207 | } 208 | 209 | .grid:before, .grid:after { 210 | display: table; 211 | content: ""; 212 | line-height: 0; 213 | } 214 | 215 | .grid:after { 216 | clear: both; 217 | } 218 | 219 | /* Utility classes */ 220 | .align-center { 221 | text-align: center; 222 | } 223 | 224 | .align-left { 225 | text-align: left; 226 | } 227 | 228 | .align-right { 229 | text-align: right; 230 | } 231 | 232 | .pull-left { 233 | float: left; 234 | } 235 | 236 | .pull-right { 237 | float: right; 238 | } 239 | 240 | /* A property for a better rendering of images in units: in 241 | this way bigger pictures are just resized if the unit 242 | becomes smaller */ 243 | .unit img { 244 | max-width: 100%; 245 | } 246 | 247 | /* Hide elements using this class by default */ 248 | .only-on-mobiles { 249 | display: none !important; 250 | } 251 | 252 | /* Responsive Stuff */ 253 | @media screen and (max-width: 568px) { 254 | /* Stack anything that isn't full-width on smaller screens 255 | and doesn't provide the no-stacking-on-mobiles class */ 256 | .grid:not(.no-stacking-on-mobiles) > .unit { 257 | width: 100% !important; 258 | padding-left: 20px; 259 | padding-right: 20px; 260 | } 261 | .unit .grid .unit { 262 | padding-left: 0px; 263 | padding-right: 0px; 264 | } 265 | /* Sometimes, you just want to be different on small screens */ 266 | .center-on-mobiles { 267 | text-align: center !important; 268 | } 269 | .hide-on-mobiles { 270 | display: none !important; 271 | } 272 | .only-on-mobiles { 273 | display: block !important; 274 | } 275 | } 276 | 277 | /* Expand the wrap a bit further on larger screens */ 278 | @media screen and (min-width: 1180px) { 279 | .wider .grid, 280 | .grid.wider { 281 | max-width: 1180px; 282 | margin: 0 auto; 283 | } 284 | } 285 | 286 | html, body { 287 | box-sizing: border-box; 288 | } 289 | 290 | html:before, html:after, body:before, body:after { 291 | box-sizing: border-box; 292 | } 293 | 294 | body { 295 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 296 | line-height: 1.5; 297 | font-size: 16px; 298 | color: #111111; 299 | font-weight: normal; 300 | } 301 | 302 | h1, h2, h3, h4, h5, h6 { 303 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 304 | font-weight: 500; 305 | line-height: 1.1; 306 | margin: 0; 307 | padding: 0; 308 | } 309 | 310 | h1 { 311 | font-size: 1.75em; 312 | } 313 | 314 | h2 { 315 | font-size: 1.5em; 316 | } 317 | 318 | h3 { 319 | font-size: 1.25em; 320 | } 321 | 322 | h4 { 323 | font-size: 1.10em; 324 | } 325 | 326 | h5 { 327 | font-size: 1em; 328 | } 329 | 330 | h6 { 331 | font-size: .85em; 332 | } 333 | 334 | nav { 335 | margin: 1em 0; 336 | } 337 | 338 | nav ul { 339 | list-style: none; 340 | margin: 0; 341 | padding: 0; 342 | } 343 | 344 | nav ul li { 345 | display: inline-block; 346 | margin-right: 1em; 347 | margin-bottom: .25em; 348 | } 349 | 350 | a { 351 | text-decoration: none; 352 | color: #4990E2; 353 | } 354 | 355 | a:hover, a:focus { 356 | color: #2e7fde; 357 | } 358 | 359 | ul, ol { 360 | margin-top: 0; 361 | padding-top: 0; 362 | padding-left: 2.5em; 363 | } 364 | 365 | p { 366 | margin: 1em 0; 367 | hyphens: auto; 368 | } 369 | 370 | p.lead { 371 | font-size: 1.2em; 372 | } 373 | 374 | p:first-child { 375 | margin-top: 0; 376 | } 377 | 378 | p:last-child { 379 | margin-bottom: 0; 380 | } 381 | 382 | p + ul, p + ol { 383 | margin-top: -.75em; 384 | } 385 | 386 | dd { 387 | margin-bottom: 1em; 388 | margin-left: 0; 389 | padding-left: 2.5em; 390 | } 391 | 392 | dt { 393 | font-weight: 700; 394 | } 395 | 396 | blockquote { 397 | margin: 0; 398 | padding-left: 2.5em; 399 | } 400 | 401 | .text-muted { 402 | color: #7A7A7A; 403 | } 404 | 405 | .text-center { 406 | text-align: center; 407 | } 408 | 409 | .heading { 410 | margin: 1em auto; 411 | padding-bottom: 1em; 412 | border-bottom: 1px solid #eee; 413 | } 414 | 415 | .heading h1 + .lead { 416 | margin-top: 0.2em; 417 | } 418 | 419 | .content { 420 | min-height: 300px; 421 | } 422 | 423 | .option { 424 | margin: 1em auto; 425 | } 426 | 427 | .option h5 { 428 | margin-bottom: 1em; 429 | } 430 | 431 | .option .radio-group label { 432 | display: block; 433 | } 434 | 435 | .option .radio-group input[type="radio"] { 436 | display: inline-block; 437 | margin: 3px 5px; 438 | } 439 | -------------------------------------------------------------------------------- /build/firefox/styles/popup.css: -------------------------------------------------------------------------------- 1 | /* 2 | App reset by Ben Frain @benfrain / benfrain.com 3 | Slightly modified by Bharani @bharani91 / github.com/bharani91 4 | */ 5 | /*Hat tip to @thierrykoblentz for this approach: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */ 6 | html { 7 | box-sizing: border-box; 8 | } 9 | 10 | * { 11 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0); 12 | -webkit-tap-highlight-color: transparent; 13 | box-sizing: inherit; 14 | } 15 | 16 | *:before, 17 | *:after { 18 | box-sizing: inherit; 19 | } 20 | 21 | input[type], 22 | [contenteditable] { 23 | user-select: text; 24 | } 25 | 26 | body, 27 | h1, 28 | h2, 29 | h3, 30 | h4, 31 | h5, 32 | h6, 33 | p { 34 | margin: 0; 35 | font-size: 1rem; 36 | font-weight: 400; 37 | } 38 | 39 | a { 40 | text-decoration: none; 41 | color: inherit; 42 | } 43 | 44 | /*IMPORTANT: This removes the focus outline for most browsers. Be aware this is a backwards accessibilty step! Mozilla (i.e. Firefox) also adds a dotted outline around a tags and buttons when they receive tab focus which I haven't found an unhacky way of removing.*/ 45 | a:focus, 46 | button:focus { 47 | outline: 0; 48 | } 49 | 50 | button { 51 | appearance: none; 52 | background-color: transparent; 53 | border: 0; 54 | padding: 0; 55 | } 56 | 57 | input, 58 | fieldset { 59 | appearance: none; 60 | border: 0; 61 | padding: 0; 62 | margin: 0; 63 | min-width: 0; 64 | font-size: 1rem; 65 | font-family: inherit; 66 | } 67 | 68 | /*This switches the default outline off when an input receives focus (really important for users tabbing through with a keyboard) so ensure you put something decent in for your input focus instead!!*/ 69 | input:focus { 70 | outline: 0; 71 | } 72 | 73 | img { 74 | max-width: 100%; 75 | display: block; 76 | } 77 | 78 | /*Removes the default focusring that Mozilla places on select items. From: http://stackoverflow.com/a/18853002/1147859 79 | Ensure you set `#000` to the colour you want your text to appear */ 80 | select:-moz-focusring { 81 | color: transparent; 82 | text-shadow: 0 0 0 #000; 83 | } 84 | 85 | html, body { 86 | box-sizing: border-box; 87 | } 88 | 89 | html:before, html:after, body:before, body:after { 90 | box-sizing: border-box; 91 | } 92 | 93 | body { 94 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 95 | line-height: 1.5; 96 | font-size: 16px; 97 | color: #111111; 98 | font-weight: normal; 99 | } 100 | 101 | h1, h2, h3, h4, h5, h6 { 102 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 103 | font-weight: 500; 104 | line-height: 1.1; 105 | margin: 0; 106 | padding: 0; 107 | } 108 | 109 | h1 { 110 | font-size: 1.75em; 111 | } 112 | 113 | h2 { 114 | font-size: 1.5em; 115 | } 116 | 117 | h3 { 118 | font-size: 1.25em; 119 | } 120 | 121 | h4 { 122 | font-size: 1.10em; 123 | } 124 | 125 | h5 { 126 | font-size: 1em; 127 | } 128 | 129 | h6 { 130 | font-size: .85em; 131 | } 132 | 133 | nav { 134 | margin: 1em 0; 135 | } 136 | 137 | nav ul { 138 | list-style: none; 139 | margin: 0; 140 | padding: 0; 141 | } 142 | 143 | nav ul li { 144 | display: inline-block; 145 | margin-right: 1em; 146 | margin-bottom: .25em; 147 | } 148 | 149 | a { 150 | text-decoration: none; 151 | color: #4990E2; 152 | } 153 | 154 | a:hover, a:focus { 155 | color: #2e7fde; 156 | } 157 | 158 | ul, ol { 159 | margin-top: 0; 160 | padding-top: 0; 161 | padding-left: 2.5em; 162 | } 163 | 164 | p { 165 | margin: 1em 0; 166 | hyphens: auto; 167 | } 168 | 169 | p.lead { 170 | font-size: 1.2em; 171 | } 172 | 173 | p:first-child { 174 | margin-top: 0; 175 | } 176 | 177 | p:last-child { 178 | margin-bottom: 0; 179 | } 180 | 181 | p + ul, p + ol { 182 | margin-top: -.75em; 183 | } 184 | 185 | dd { 186 | margin-bottom: 1em; 187 | margin-left: 0; 188 | padding-left: 2.5em; 189 | } 190 | 191 | dt { 192 | font-weight: 700; 193 | } 194 | 195 | blockquote { 196 | margin: 0; 197 | padding-left: 2.5em; 198 | } 199 | 200 | body, html { 201 | padding: 0; 202 | margin: 0; 203 | } 204 | 205 | #app { 206 | padding: 20px 20px; 207 | background: #ffffff; 208 | } 209 | 210 | footer { 211 | color: #7A7A7A; 212 | text-align: right; 213 | font-size: 0.8em; 214 | } 215 | 216 | footer a { 217 | outline: none; 218 | color: #949494; 219 | } 220 | 221 | footer a:hover { 222 | color: #7A7A7A; 223 | } 224 | 225 | .popup-content { 226 | min-width: 600px; 227 | min-height: 100%; 228 | max-width: 1000px; 229 | } 230 | 231 | .app-name { 232 | font-size: 14px; 233 | color: #7A7A7A; 234 | text-align: left; 235 | margin: 0 auto 1em auto; 236 | padding: 0; 237 | } 238 | 239 | .site-description { 240 | padding: 0.5em; 241 | border: 1px solid #eeeeee; 242 | margin: 0; 243 | } 244 | 245 | .site-description h3 { 246 | margin: 0; 247 | padding: 0; 248 | border-bottom: 1px solid #eeeeee; 249 | padding-bottom: 0.5em; 250 | } 251 | 252 | .site-description .description { 253 | color: #7A7A7A; 254 | max-height: 100px; 255 | font-size: 0.8em; 256 | line-height: 1.2; 257 | margin-top: 10px; 258 | } 259 | 260 | .site-description .url { 261 | outline: none; 262 | text-decoration: none; 263 | line-height: 1.2; 264 | font-size: 0.8em; 265 | word-break: break-word; 266 | display: block; 267 | } 268 | 269 | .action-container { 270 | margin: 1em auto; 271 | } 272 | 273 | .btn { 274 | background: none; 275 | border: none; 276 | display: inline-block; 277 | cursor: pointer; 278 | padding: 0.5em 1.5em; 279 | background: #4990E2; 280 | color: #ffffff; 281 | font-weight: 500; 282 | border-radius: 2px; 283 | outline: none; 284 | font-size: 1em; 285 | } 286 | -------------------------------------------------------------------------------- /build/opera/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FOFA Pro View", 3 | "version": "0.0.5", 4 | "manifest_version": 2, 5 | "description": "FOFA Pro view ", 6 | "icons": { 7 | "16": "icons/icon-16.png", 8 | "128": "icons/icon-128.png" 9 | }, 10 | "default_locale": "en", 11 | "background": { 12 | "scripts": [ 13 | "scripts/livereload.js", 14 | "scripts/background.js" 15 | ] 16 | }, 17 | "permissions": [ 18 | "tabs", 19 | "storage", 20 | "http://*/*", 21 | "https://*/*" 22 | ], 23 | "content_scripts": [ 24 | { 25 | "matches": [ 26 | "http://*/*", 27 | "https://*/*" 28 | ], 29 | "js": [ 30 | "scripts/contentscript.js" 31 | ], 32 | "run_at": "document_end", 33 | "all_frames": false 34 | } 35 | ], 36 | "browser_action": { 37 | "default_icon": { 38 | "19": "icons/icon-19.png", 39 | "38": "icons/icon-38.png" 40 | }, 41 | "default_title": "FOFA Pro view", 42 | "default_popup": "popup.html" 43 | } 44 | } -------------------------------------------------------------------------------- /build/opera/scripts/background.js: -------------------------------------------------------------------------------- 1 | (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i .unit { 129 | padding-top: 0; 130 | } 131 | 132 | .unit .grid:last-child > .unit { 133 | padding-bottom: 0; 134 | } 135 | 136 | /* Let people nuke the gutters/padding completely in a couple of ways */ 137 | .no-gutters .unit, 138 | .unit.no-gutters { 139 | padding: 0 !important; 140 | } 141 | 142 | /* Wrapping at a maximum width is optional */ 143 | .wrap .grid, 144 | .grid.wrap { 145 | max-width: 978px; 146 | margin: 0 auto; 147 | } 148 | 149 | /* Width classes also have shorthand versions numbered as fractions 150 | * For example: for a grid unit 1/3 (one third) of the parent width, 151 | * simply apply class="w-1-3" to the element. */ 152 | .grid .whole, .grid .w-1-1 { 153 | width: 100%; 154 | } 155 | 156 | .grid .half, .grid .w-1-2 { 157 | width: 50%; 158 | } 159 | 160 | .grid .one-third, .grid .w-1-3 { 161 | width: 33.3332%; 162 | } 163 | 164 | .grid .two-thirds, .grid .w-2-3 { 165 | width: 66.6665%; 166 | } 167 | 168 | .grid .one-quarter, 169 | .grid .one-fourth, .grid .w-1-4 { 170 | width: 25%; 171 | } 172 | 173 | .grid .three-quarters, 174 | .grid .three-fourths, .grid .w-3-4 { 175 | width: 75%; 176 | } 177 | 178 | .grid .one-fifth, .grid .w-1-5 { 179 | width: 20%; 180 | } 181 | 182 | .grid .two-fifths, .grid .w-2-5 { 183 | width: 40%; 184 | } 185 | 186 | .grid .three-fifths, .grid .w-3-5 { 187 | width: 60%; 188 | } 189 | 190 | .grid .four-fifths, .grid .w-4-5 { 191 | width: 80%; 192 | } 193 | 194 | .grid .golden-small, .grid .w-g-s { 195 | width: 38.2716%; 196 | } 197 | 198 | /* Golden section: smaller piece */ 199 | .grid .golden-large, .grid .w-g-l { 200 | width: 61.7283%; 201 | } 202 | 203 | /* Golden section: larger piece */ 204 | /* Clearfix after every .grid */ 205 | .grid { 206 | *zoom: 1; 207 | } 208 | 209 | .grid:before, .grid:after { 210 | display: table; 211 | content: ""; 212 | line-height: 0; 213 | } 214 | 215 | .grid:after { 216 | clear: both; 217 | } 218 | 219 | /* Utility classes */ 220 | .align-center { 221 | text-align: center; 222 | } 223 | 224 | .align-left { 225 | text-align: left; 226 | } 227 | 228 | .align-right { 229 | text-align: right; 230 | } 231 | 232 | .pull-left { 233 | float: left; 234 | } 235 | 236 | .pull-right { 237 | float: right; 238 | } 239 | 240 | /* A property for a better rendering of images in units: in 241 | this way bigger pictures are just resized if the unit 242 | becomes smaller */ 243 | .unit img { 244 | max-width: 100%; 245 | } 246 | 247 | /* Hide elements using this class by default */ 248 | .only-on-mobiles { 249 | display: none !important; 250 | } 251 | 252 | /* Responsive Stuff */ 253 | @media screen and (max-width: 568px) { 254 | /* Stack anything that isn't full-width on smaller screens 255 | and doesn't provide the no-stacking-on-mobiles class */ 256 | .grid:not(.no-stacking-on-mobiles) > .unit { 257 | width: 100% !important; 258 | padding-left: 20px; 259 | padding-right: 20px; 260 | } 261 | .unit .grid .unit { 262 | padding-left: 0px; 263 | padding-right: 0px; 264 | } 265 | /* Sometimes, you just want to be different on small screens */ 266 | .center-on-mobiles { 267 | text-align: center !important; 268 | } 269 | .hide-on-mobiles { 270 | display: none !important; 271 | } 272 | .only-on-mobiles { 273 | display: block !important; 274 | } 275 | } 276 | 277 | /* Expand the wrap a bit further on larger screens */ 278 | @media screen and (min-width: 1180px) { 279 | .wider .grid, 280 | .grid.wider { 281 | max-width: 1180px; 282 | margin: 0 auto; 283 | } 284 | } 285 | 286 | html, body { 287 | box-sizing: border-box; 288 | } 289 | 290 | html:before, html:after, body:before, body:after { 291 | box-sizing: border-box; 292 | } 293 | 294 | body { 295 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 296 | line-height: 1.5; 297 | font-size: 16px; 298 | color: #111111; 299 | font-weight: normal; 300 | } 301 | 302 | h1, h2, h3, h4, h5, h6 { 303 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 304 | font-weight: 500; 305 | line-height: 1.1; 306 | margin: 0; 307 | padding: 0; 308 | } 309 | 310 | h1 { 311 | font-size: 1.75em; 312 | } 313 | 314 | h2 { 315 | font-size: 1.5em; 316 | } 317 | 318 | h3 { 319 | font-size: 1.25em; 320 | } 321 | 322 | h4 { 323 | font-size: 1.10em; 324 | } 325 | 326 | h5 { 327 | font-size: 1em; 328 | } 329 | 330 | h6 { 331 | font-size: .85em; 332 | } 333 | 334 | nav { 335 | margin: 1em 0; 336 | } 337 | 338 | nav ul { 339 | list-style: none; 340 | margin: 0; 341 | padding: 0; 342 | } 343 | 344 | nav ul li { 345 | display: inline-block; 346 | margin-right: 1em; 347 | margin-bottom: .25em; 348 | } 349 | 350 | a { 351 | text-decoration: none; 352 | color: #4990E2; 353 | } 354 | 355 | a:hover, a:focus { 356 | color: #2e7fde; 357 | } 358 | 359 | ul, ol { 360 | margin-top: 0; 361 | padding-top: 0; 362 | padding-left: 2.5em; 363 | } 364 | 365 | p { 366 | margin: 1em 0; 367 | hyphens: auto; 368 | } 369 | 370 | p.lead { 371 | font-size: 1.2em; 372 | } 373 | 374 | p:first-child { 375 | margin-top: 0; 376 | } 377 | 378 | p:last-child { 379 | margin-bottom: 0; 380 | } 381 | 382 | p + ul, p + ol { 383 | margin-top: -.75em; 384 | } 385 | 386 | dd { 387 | margin-bottom: 1em; 388 | margin-left: 0; 389 | padding-left: 2.5em; 390 | } 391 | 392 | dt { 393 | font-weight: 700; 394 | } 395 | 396 | blockquote { 397 | margin: 0; 398 | padding-left: 2.5em; 399 | } 400 | 401 | .text-muted { 402 | color: #7A7A7A; 403 | } 404 | 405 | .text-center { 406 | text-align: center; 407 | } 408 | 409 | .heading { 410 | margin: 1em auto; 411 | padding-bottom: 1em; 412 | border-bottom: 1px solid #eee; 413 | } 414 | 415 | .heading h1 + .lead { 416 | margin-top: 0.2em; 417 | } 418 | 419 | .content { 420 | min-height: 300px; 421 | } 422 | 423 | .option { 424 | margin: 1em auto; 425 | } 426 | 427 | .option h5 { 428 | margin-bottom: 1em; 429 | } 430 | 431 | .option .radio-group label { 432 | display: block; 433 | } 434 | 435 | .option .radio-group input[type="radio"] { 436 | display: inline-block; 437 | margin: 3px 5px; 438 | } 439 | -------------------------------------------------------------------------------- /build/opera/styles/popup.css: -------------------------------------------------------------------------------- 1 | /* 2 | App reset by Ben Frain @benfrain / benfrain.com 3 | Slightly modified by Bharani @bharani91 / github.com/bharani91 4 | */ 5 | /*Hat tip to @thierrykoblentz for this approach: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */ 6 | html { 7 | box-sizing: border-box; 8 | } 9 | 10 | * { 11 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0); 12 | -webkit-tap-highlight-color: transparent; 13 | box-sizing: inherit; 14 | } 15 | 16 | *:before, 17 | *:after { 18 | box-sizing: inherit; 19 | } 20 | 21 | input[type], 22 | [contenteditable] { 23 | user-select: text; 24 | } 25 | 26 | body, 27 | h1, 28 | h2, 29 | h3, 30 | h4, 31 | h5, 32 | h6, 33 | p { 34 | margin: 0; 35 | font-size: 1rem; 36 | font-weight: 400; 37 | } 38 | 39 | a { 40 | text-decoration: none; 41 | color: inherit; 42 | } 43 | 44 | /*IMPORTANT: This removes the focus outline for most browsers. Be aware this is a backwards accessibilty step! Mozilla (i.e. Firefox) also adds a dotted outline around a tags and buttons when they receive tab focus which I haven't found an unhacky way of removing.*/ 45 | a:focus, 46 | button:focus { 47 | outline: 0; 48 | } 49 | 50 | button { 51 | appearance: none; 52 | background-color: transparent; 53 | border: 0; 54 | padding: 0; 55 | } 56 | 57 | input, 58 | fieldset { 59 | appearance: none; 60 | border: 0; 61 | padding: 0; 62 | margin: 0; 63 | min-width: 0; 64 | font-size: 1rem; 65 | font-family: inherit; 66 | } 67 | 68 | /*This switches the default outline off when an input receives focus (really important for users tabbing through with a keyboard) so ensure you put something decent in for your input focus instead!!*/ 69 | input:focus { 70 | outline: 0; 71 | } 72 | 73 | img { 74 | max-width: 100%; 75 | display: block; 76 | } 77 | 78 | /*Removes the default focusring that Mozilla places on select items. From: http://stackoverflow.com/a/18853002/1147859 79 | Ensure you set `#000` to the colour you want your text to appear */ 80 | select:-moz-focusring { 81 | color: transparent; 82 | text-shadow: 0 0 0 #000; 83 | } 84 | 85 | html, body { 86 | box-sizing: border-box; 87 | } 88 | 89 | html:before, html:after, body:before, body:after { 90 | box-sizing: border-box; 91 | } 92 | 93 | body { 94 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 95 | line-height: 1.5; 96 | font-size: 16px; 97 | color: #111111; 98 | font-weight: normal; 99 | } 100 | 101 | h1, h2, h3, h4, h5, h6 { 102 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 103 | font-weight: 500; 104 | line-height: 1.1; 105 | margin: 0; 106 | padding: 0; 107 | } 108 | 109 | h1 { 110 | font-size: 1.75em; 111 | } 112 | 113 | h2 { 114 | font-size: 1.5em; 115 | } 116 | 117 | h3 { 118 | font-size: 1.25em; 119 | } 120 | 121 | h4 { 122 | font-size: 1.10em; 123 | } 124 | 125 | h5 { 126 | font-size: 1em; 127 | } 128 | 129 | h6 { 130 | font-size: .85em; 131 | } 132 | 133 | nav { 134 | margin: 1em 0; 135 | } 136 | 137 | nav ul { 138 | list-style: none; 139 | margin: 0; 140 | padding: 0; 141 | } 142 | 143 | nav ul li { 144 | display: inline-block; 145 | margin-right: 1em; 146 | margin-bottom: .25em; 147 | } 148 | 149 | a { 150 | text-decoration: none; 151 | color: #4990E2; 152 | } 153 | 154 | a:hover, a:focus { 155 | color: #2e7fde; 156 | } 157 | 158 | ul, ol { 159 | margin-top: 0; 160 | padding-top: 0; 161 | padding-left: 2.5em; 162 | } 163 | 164 | p { 165 | margin: 1em 0; 166 | hyphens: auto; 167 | } 168 | 169 | p.lead { 170 | font-size: 1.2em; 171 | } 172 | 173 | p:first-child { 174 | margin-top: 0; 175 | } 176 | 177 | p:last-child { 178 | margin-bottom: 0; 179 | } 180 | 181 | p + ul, p + ol { 182 | margin-top: -.75em; 183 | } 184 | 185 | dd { 186 | margin-bottom: 1em; 187 | margin-left: 0; 188 | padding-left: 2.5em; 189 | } 190 | 191 | dt { 192 | font-weight: 700; 193 | } 194 | 195 | blockquote { 196 | margin: 0; 197 | padding-left: 2.5em; 198 | } 199 | 200 | body, html { 201 | padding: 0; 202 | margin: 0; 203 | } 204 | 205 | #app { 206 | padding: 20px 20px; 207 | background: #ffffff; 208 | } 209 | 210 | footer { 211 | color: #7A7A7A; 212 | text-align: right; 213 | font-size: 0.8em; 214 | } 215 | 216 | footer a { 217 | outline: none; 218 | color: #949494; 219 | } 220 | 221 | footer a:hover { 222 | color: #7A7A7A; 223 | } 224 | 225 | .popup-content { 226 | min-width: 600px; 227 | min-height: 100%; 228 | max-width: 1000px; 229 | } 230 | 231 | .app-name { 232 | font-size: 14px; 233 | color: #7A7A7A; 234 | text-align: left; 235 | margin: 0 auto 1em auto; 236 | padding: 0; 237 | } 238 | 239 | .site-description { 240 | padding: 0.5em; 241 | border: 1px solid #eeeeee; 242 | margin: 0; 243 | } 244 | 245 | .site-description h3 { 246 | margin: 0; 247 | padding: 0; 248 | border-bottom: 1px solid #eeeeee; 249 | padding-bottom: 0.5em; 250 | } 251 | 252 | .site-description .description { 253 | color: #7A7A7A; 254 | max-height: 100px; 255 | font-size: 0.8em; 256 | line-height: 1.2; 257 | margin-top: 10px; 258 | } 259 | 260 | .site-description .url { 261 | outline: none; 262 | text-decoration: none; 263 | line-height: 1.2; 264 | font-size: 0.8em; 265 | word-break: break-word; 266 | display: block; 267 | } 268 | 269 | .action-container { 270 | margin: 1em auto; 271 | } 272 | 273 | .btn { 274 | background: none; 275 | border: none; 276 | display: inline-block; 277 | cursor: pointer; 278 | padding: 0.5em 1.5em; 279 | background: #4990E2; 280 | color: #ffffff; 281 | font-weight: 500; 282 | border-radius: 2px; 283 | outline: none; 284 | font-size: 1em; 285 | } 286 | -------------------------------------------------------------------------------- /config/chrome.json: -------------------------------------------------------------------------------- 1 | { 2 | "extension": "chrome" 3 | } -------------------------------------------------------------------------------- /config/development.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": "development" 3 | } -------------------------------------------------------------------------------- /config/firefox.json: -------------------------------------------------------------------------------- 1 | { 2 | "extension": "firefox" 3 | } -------------------------------------------------------------------------------- /config/opera.json: -------------------------------------------------------------------------------- 1 | { 2 | "extension": "opera" 3 | } -------------------------------------------------------------------------------- /config/production.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": "production" 3 | } -------------------------------------------------------------------------------- /googleea4f71f894b7827d.html: -------------------------------------------------------------------------------- 1 | google-site-verification: googleea4f71f894b7827d.html -------------------------------------------------------------------------------- /gulpfile.babel.js: -------------------------------------------------------------------------------- 1 | /* 2 | import fs from "fs"; 3 | import gulp from 'gulp'; 4 | import {merge} from 'event-stream' 5 | import browserify from 'browserify'; 6 | import source from 'vinyl-source-stream'; 7 | import buffer from 'vinyl-buffer'; 8 | import preprocessify from 'preprocessify'; 9 | import gulpif from "gulp-if"; 10 | */ 11 | 12 | var gulp =require('gulp'); 13 | //var merge = require('event-stream'); 14 | const {merge} = require('event-stream'); 15 | var browserify = require('browserify'); 16 | var source = require('vinyl-source-stream'); 17 | var buffer = require('vinyl-buffer'); 18 | var preprocessify = require('preprocessify'); 19 | var gulpif = require("gulp-if"); 20 | var fs = require('fs'); 21 | 22 | const $ = require('gulp-load-plugins')(); 23 | 24 | var production = process.env.NODE_ENV === "production"; 25 | var target = process.env.TARGET || "chrome"; 26 | var environment = process.env.NODE_ENV || "development"; 27 | 28 | var generic = JSON.parse(fs.readFileSync(`./config/${environment}.json`)); 29 | var specific = JSON.parse(fs.readFileSync(`./config/${target}.json`)); 30 | var context = Object.assign({}, generic, specific); 31 | 32 | var manifest = { 33 | dev: { 34 | "background": { 35 | "scripts": [ 36 | "scripts/livereload.js", 37 | "scripts/background.js" 38 | ] 39 | } 40 | }, 41 | 42 | firefox: { 43 | "applications": { 44 | "gecko": { 45 | "id": "woo0nise@gmail.com" 46 | } 47 | } 48 | } 49 | }; 50 | 51 | // Tasks 52 | gulp.task('clean', () => { 53 | return pipe(`./build/${target}`, $.clean()) 54 | }); 55 | 56 | gulp.task('build', (cb) => { 57 | $.runSequence('clean', 'styles', 'ext', cb) 58 | }); 59 | 60 | gulp.task('watch', ['build'], () => { 61 | $.livereload.listen(); 62 | 63 | gulp.watch(['./src/**/*']).on("change", () => { 64 | $.runSequence('build', $.livereload.reload); 65 | }); 66 | }); 67 | 68 | gulp.task('default', ['build']); 69 | 70 | gulp.task('ext', ['manifest', 'js'], () => { 71 | return mergeAll(target) 72 | }); 73 | 74 | 75 | // ----------------- 76 | // COMMON 77 | // ----------------- 78 | gulp.task('js', () => { 79 | return buildJS(target) 80 | }); 81 | 82 | gulp.task('styles', () => { 83 | return gulp.src('src/styles/**/*.scss') 84 | .pipe($.plumber()) 85 | .pipe($.sass.sync({ 86 | outputStyle: 'expanded', 87 | precision: 10, 88 | includePaths: ['.'] 89 | }).on('error', $.sass.logError)) 90 | .pipe(gulp.dest(`build/${target}/styles`)); 91 | }); 92 | 93 | gulp.task("manifest", () => { 94 | return gulp.src('./manifest.json') 95 | .pipe(gulpif(!production, $.mergeJson({ 96 | fileName: "manifest.json", 97 | jsonSpace: " ".repeat(4), 98 | endObj: manifest.dev 99 | }))) 100 | .pipe(gulpif(target === "firefox", $.mergeJson({ 101 | fileName: "manifest.json", 102 | jsonSpace: " ".repeat(4), 103 | endObj: manifest.firefox 104 | }))) 105 | .pipe(gulp.dest(`./build/${target}`)) 106 | }); 107 | 108 | 109 | 110 | // ----------------- 111 | // DIST 112 | // ----------------- 113 | gulp.task('dist', (cb) => { 114 | $.runSequence('build', 'zip', cb) 115 | }); 116 | 117 | gulp.task('zip', () => { 118 | return pipe(`./build/${target}/**/*`, $.zip(`${target}.zip`), './dist') 119 | }); 120 | 121 | 122 | // Helpers 123 | function pipe(src, ...transforms) { 124 | return transforms.reduce((stream, transform) => { 125 | const isDest = typeof transform === 'string' 126 | return stream.pipe(isDest ? gulp.dest(transform) : transform) 127 | }, gulp.src(src)) 128 | } 129 | 130 | function mergeAll(dest) { 131 | return merge( 132 | pipe('./src/icons/**/*', `./build/${dest}/icons`), 133 | pipe('./src/font/**/*', `./build/${dest}/font`), 134 | pipe('./src/layer/**/*', `./build/${dest}/layer`), 135 | pipe('./src/jquery/**/*', `./build/${dest}/jquery`), 136 | pipe(['./src/_locales/**/*'], `./build/${dest}/_locales`), 137 | pipe([`./src/images/${target}/**/*`], `./build/${dest}/images`), 138 | pipe(['./src/images/shared/**/*'], `./build/${dest}/images`), 139 | pipe(['./src/**/*.html'], `./build/${dest}`) 140 | ) 141 | } 142 | 143 | function buildJS(target) { 144 | const files = [ 145 | 'background.js', 146 | 'contentscript.js', 147 | 'options.js', 148 | 'popup.js', 149 | 'livereload.js' 150 | ]; 151 | 152 | let tasks = files.map( file => { 153 | return browserify({ 154 | entries: 'src/scripts/' + file, 155 | debug: true 156 | }) 157 | .transform('babelify', { presets: ['es2015'] }) 158 | .transform(preprocessify, { 159 | includeExtensions: ['.js'], 160 | context: context 161 | }) 162 | .bundle() 163 | .pipe(source(file)) 164 | .pipe(buffer()) 165 | .pipe(gulpif(!production, $.sourcemaps.init({ loadMaps: true }) )) 166 | .pipe(gulpif(!production, $.sourcemaps.write('./') )) 167 | .pipe(gulpif(production, $.uglify({ 168 | "mangle": false, 169 | "output": { 170 | "ascii_only": true 171 | } 172 | }))) 173 | .pipe(gulp.dest(`build/${target}/scripts`)); 174 | }); 175 | return merge.apply(null, tasks); 176 | } 177 | -------------------------------------------------------------------------------- /images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/images/1.png -------------------------------------------------------------------------------- /images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/images/3.png -------------------------------------------------------------------------------- /images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/images/4.png -------------------------------------------------------------------------------- /images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/images/5.png -------------------------------------------------------------------------------- /images/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/images/6.png -------------------------------------------------------------------------------- /images/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/images/7.png -------------------------------------------------------------------------------- /images/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/images/8.png -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FOFA Pro View", 3 | "version": "0.0.4", 4 | "manifest_version": 2, 5 | "description": "FOFA Pro view ", 6 | "icons": { 7 | "16": "icons/icon-16.png", 8 | "128": "icons/icon-128.png" 9 | }, 10 | "default_locale": "en", 11 | "background": { 12 | "scripts": [ 13 | "scripts/background.js" 14 | ] 15 | }, 16 | "permissions": [ 17 | "tabs", 18 | "storage", 19 | "http://*/*", 20 | "https://*/*" 21 | ], 22 | "content_scripts": [ 23 | { 24 | "matches": [ 25 | "http://*/*", 26 | "https://*/*" 27 | ], 28 | "js": [ 29 | "scripts/contentscript.js" 30 | ], 31 | "run_at": "document_end", 32 | "all_frames": false 33 | } 34 | ], 35 | "browser_action": { 36 | "default_icon": { 37 | "19": "icons/icon-19.png", 38 | "38": "icons/icon-38.png" 39 | }, 40 | "default_title": "FOFA Pro view", 41 | "default_popup": "popup.html" 42 | } 43 | } 44 | 45 | 46 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fofa_view", 3 | "version": "0.0.5", 4 | "description": "FOFA Pro view", 5 | "scripts": { 6 | "chrome-build": "cross-env TARGET=chrome gulp", 7 | "opera-build": "cross-env TARGET=opera gulp", 8 | "firefox-build": "cross-env TARGET=firefox gulp", 9 | "build": "cross-env NODE_ENV=production npm run chrome-build && cross-env NODE_ENV=production npm run opera-build && cross-env NODE_ENV=production npm run firefox-build", 10 | "chrome-watch": "cross-env TARGET=chrome gulp watch", 11 | "opera-watch": "cross-env TARGET=opera gulp watch", 12 | "firefox-watch": "cross-env TARGET=firefox gulp watch", 13 | "chrome-dist": "cross-env NODE_ENV=production cross-env TARGET=chrome gulp dist", 14 | "opera-dist": "cross-env NODE_ENV=production cross-env TARGET=opera gulp dist", 15 | "firefox-dist": "cross-env NODE_ENV=production cross-env TARGET=firefox gulp dist", 16 | "dist": "npm run chrome-dist && npm run opera-dist && npm run firefox-dist" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "https://github.com/fofapro/fofa_view" 21 | }, 22 | "author": "R4v3zn (https://github.com/0nise)", 23 | "bugs": { 24 | "url": "https://github.com/fofapro/fofa_view/issues" 25 | }, 26 | "homepage": "https://github.com/fofapro/fofa_view", 27 | "devDependencies": { 28 | "@babel/core": "^7.7.7", 29 | "babel-core": "^6.1.2", 30 | "babel-preset-es2015": "^6.1.2", 31 | "babelify": "^7.3.0", 32 | "browserify": "^14.1.0", 33 | "cross-env": "^3.2.4", 34 | "event-stream": "^3.3.4", 35 | "gulp": "^3.9.0", 36 | "gulp-babel": "^6.1.0", 37 | "gulp-clean": "^0.3.1", 38 | "gulp-eslint": "^2.0.0", 39 | "gulp-if": "^2.0.2", 40 | "gulp-livereload": "^3.8.1", 41 | "gulp-load-plugins": "^0.5.3", 42 | "gulp-merge-json": "^1.0.0", 43 | "gulp-plumber": "^1.1.0", 44 | "gulp-rename": "^1.2.2", 45 | "gulp-run-sequence": "*", 46 | "gulp-sass": "^2.2.0", 47 | "gulp-sourcemaps": "^1.6.0", 48 | "gulp-uglify": "^1.5.4", 49 | "gulp-zip": "^2.0.3", 50 | "preprocessify": "^1.0.1", 51 | "vinyl-buffer": "^1.0.0", 52 | "vinyl-source-stream": "^1.1.0", 53 | "babel-plugin-transform-decorators-legacy": "^1.3.4" 54 | }, 55 | "dependencies": { 56 | "axios": ">=0.21.1", 57 | "cheerio": "^1.0.0-rc.3", 58 | "element-ui": "^2.13.0", 59 | "js-base64": "^2.5.1", 60 | "vue": "^2.5.17" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /resources/chrome-promo/large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/resources/chrome-promo/large.png -------------------------------------------------------------------------------- /resources/chrome-promo/marquee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/resources/chrome-promo/marquee.png -------------------------------------------------------------------------------- /resources/chrome-promo/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/resources/chrome-promo/small.png -------------------------------------------------------------------------------- /resources/extension-assets.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/resources/extension-assets.sketch -------------------------------------------------------------------------------- /src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/.DS_Store -------------------------------------------------------------------------------- /src/_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "Ext Starter", 4 | "description": "The name of the extension." 5 | }, 6 | "appDescription": { 7 | "message": "Boilerplate for building cross browser extensions", 8 | "description": "The description of the extension." 9 | }, 10 | "btnTooltip": { 11 | "message": "Ext Starter", 12 | "description": "Tooltip for the button." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/font/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/font/.DS_Store -------------------------------------------------------------------------------- /src/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/font/iconfont.ttf -------------------------------------------------------------------------------- /src/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/font/iconfont.woff -------------------------------------------------------------------------------- /src/font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/font/iconfont.woff2 -------------------------------------------------------------------------------- /src/icons/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/icons/icon-128.png -------------------------------------------------------------------------------- /src/icons/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/icons/icon-16.png -------------------------------------------------------------------------------- /src/icons/icon-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/icons/icon-19.png -------------------------------------------------------------------------------- /src/icons/icon-38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/icons/icon-38.png -------------------------------------------------------------------------------- /src/icons/icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/icons/icon-64.png -------------------------------------------------------------------------------- /src/images/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/images/.gitkeep -------------------------------------------------------------------------------- /src/images/chrome/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/images/chrome/.gitkeep -------------------------------------------------------------------------------- /src/images/firefox/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/images/firefox/.gitkeep -------------------------------------------------------------------------------- /src/images/opera/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/images/opera/.gitkeep -------------------------------------------------------------------------------- /src/images/shared/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/images/shared/.gitkeep -------------------------------------------------------------------------------- /src/layer/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/layer/.DS_Store -------------------------------------------------------------------------------- /src/layer/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer-v3.1.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */ 2 | ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
'+(f?r.title[0]:r.title)+"
":"";return r.zIndex=s,t([r.shade?'
':"",'
'+(e&&2!=r.type?"":u)+'
'+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
'+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
'+e+"
"}():"")+(r.resize?'':"")+"
"],u,i('
')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
    '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
  • '+(t[0].content||"no content")+"
  • ";i'+(t[i].content||"no content")+"";return a}()+"
",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
'+(u.length>1?'':"")+'
'+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); -------------------------------------------------------------------------------- /src/layer/mobile/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/layer/mobile/.DS_Store -------------------------------------------------------------------------------- /src/layer/mobile/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */ 2 | ;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'

'+(e?n.title[0]:n.title)+"

":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e=''+n.btn[0]+"",2===t&&(e=''+n.btn[1]+""+e),'
'+e+"
"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='

'+(n.content||"")+"

"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"
':"")+'
"+l+'
'+n.content+"
"+c+"
",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;odiv{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} -------------------------------------------------------------------------------- /src/layer/theme/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/layer/theme/.DS_Store -------------------------------------------------------------------------------- /src/layer/theme/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/layer/theme/default/icon-ext.png -------------------------------------------------------------------------------- /src/layer/theme/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/layer/theme/default/icon.png -------------------------------------------------------------------------------- /src/layer/theme/default/layer.css: -------------------------------------------------------------------------------- 1 | .layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}html #layuicss-layer{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;border-radius:2px;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layer-anim{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-00{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 15px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:5px 5px 0;padding:0 15px;border:1px solid #dedede;background-color:#fff;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#1E9FFF;background-color:#1E9FFF;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:8px 15px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#E9E7E7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:230px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;overflow:hidden;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:43px;border-left:1px solid #eee;border-right:1px solid #eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}} -------------------------------------------------------------------------------- /src/layer/theme/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/layer/theme/default/loading-0.gif -------------------------------------------------------------------------------- /src/layer/theme/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/layer/theme/default/loading-1.gif -------------------------------------------------------------------------------- /src/layer/theme/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fofapro/fofa_view/670c9a68056accb95bc7a8f9bb8f282bebb8f7d5/src/layer/theme/default/loading-2.gif -------------------------------------------------------------------------------- /src/options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Options & Settings 8 | 9 | 10 |
11 |
12 |
13 |

Extension Boilerplate

14 |

A foundation for creating cross-browser extensions

15 |
16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 |
Popup color
24 |
25 | 26 | 27 | 28 |
29 |
30 | 31 |
32 | ...display your extensions' options here... 33 |
34 | 35 |
36 |
37 |
38 | 39 | 40 |
41 |
42 |
43 |

44 | © Extension Boilerplate 45 |

46 |
47 |
48 | 49 |
50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 25 | 26 | 27 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/scripts/background.js: -------------------------------------------------------------------------------- 1 | import ext from "./utils/ext"; 2 | 3 | ext.runtime.onMessage.addListener( 4 | function(request, sender, sendResponse) { 5 | if(request.action === "perform-save") { 6 | console.log("Extension Type: ", "/* @echo extension */"); 7 | console.log("PERFORM AJAX", request.data); 8 | 9 | sendResponse({ action: "saved" }); 10 | } 11 | } 12 | ); -------------------------------------------------------------------------------- /src/scripts/contentscript.js: -------------------------------------------------------------------------------- 1 | import ext from "./utils/ext"; 2 | 3 | var extractTags = () => { 4 | var url = document.location.href; 5 | if(!url || !url.match(/^http/)) return; 6 | 7 | var data = { 8 | title: "", 9 | description: "", 10 | url: document.location.href 11 | } 12 | 13 | var ogTitle = document.querySelector("meta[property='og:title']"); 14 | if(ogTitle) { 15 | data.title = ogTitle.getAttribute("content") 16 | } else { 17 | data.title = document.title 18 | } 19 | 20 | var descriptionTag = document.querySelector("meta[property='og:description']") || document.querySelector("meta[name='description']") 21 | if(descriptionTag) { 22 | data.description = descriptionTag.getAttribute("content") 23 | } 24 | 25 | return data; 26 | } 27 | 28 | function onRequest(request, sender, sendResponse) { 29 | if (request.action === 'process-page') { 30 | sendResponse(extractTags()) 31 | } 32 | } 33 | 34 | ext.runtime.onMessage.addListener(onRequest); -------------------------------------------------------------------------------- /src/scripts/livereload.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import ext from "./utils/ext"; 4 | 5 | var LIVERELOAD_HOST = 'localhost:'; 6 | var LIVERELOAD_PORT = 35729; 7 | var connection = new WebSocket('ws://' + LIVERELOAD_HOST + LIVERELOAD_PORT + '/livereload'); 8 | 9 | connection.onerror = function (error) { 10 | console.log('reload connection got error:', error); 11 | }; 12 | 13 | connection.onmessage = function (e) { 14 | if (e.data) { 15 | var data = JSON.parse(e.data); 16 | if (data && data.command === 'reload') { 17 | ext.runtime.reload(); 18 | } 19 | } 20 | }; -------------------------------------------------------------------------------- /src/scripts/options.js: -------------------------------------------------------------------------------- 1 | import ext from "./utils/ext"; 2 | import storage from "./utils/storage"; 3 | 4 | var colorSelectors = document.querySelectorAll(".js-radio"); 5 | 6 | var setColor = (color) => { 7 | document.body.style.backgroundColor = color; 8 | }; 9 | 10 | storage.get('color', function(resp) { 11 | var color = resp.color; 12 | var option; 13 | if(color) { 14 | option = document.querySelector(`.js-radio.${color}`); 15 | setColor(color); 16 | } else { 17 | option = colorSelectors[0] 18 | } 19 | 20 | option.setAttribute("checked", "checked"); 21 | }); 22 | 23 | colorSelectors.forEach(function(el) { 24 | el.addEventListener("click", function(e) { 25 | var value = this.value; 26 | storage.set({ color: value }, function() { 27 | setColor(value); 28 | }); 29 | }) 30 | }) -------------------------------------------------------------------------------- /src/scripts/popup.js: -------------------------------------------------------------------------------- 1 | import ext from "./utils/ext"; 2 | import storage from "./utils/storage"; 3 | import axios from 'axios'; 4 | import cheerio from 'cheerio'; 5 | import { Base64 } from 'js-base64'; 6 | 7 | var popup = document.getElementById("app"); 8 | storage.get('color', function(resp) { 9 | var color = resp.color; 10 | if(color) { 11 | popup.style.backgroundColor = color 12 | } 13 | }); 14 | 15 | // ip 正则 16 | const ipReg = /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/; 17 | // 域名正则 18 | const domainReg = /https?:\/\/.+?\//; 19 | 20 | const baseFofaUrl = "https://fofa.info/hosts/"; 21 | 22 | const baseFofaSearch = "https://fofa.info/result?qbase64="; 23 | 24 | var getZichan = (ip,load) => { 25 | // ip = "88.198.38.135" 26 | // ip = "18.163.79.100" 27 | let newUrl = baseFofaSearch + Base64.encode("ip=\""+ip+"\""); 28 | let cHost = baseFofaSearch + Base64.encode("ip=\""+ip+"/24\""); 29 | axios({ 30 | method: 'get', 31 | url: newUrl, 32 | }).then(function (response) { 33 | let rspData = response.data; 34 | let root = cheerio.load(rspData); 35 | let list = root("div[class=rightListsMain]") 36 | let innerHtml = ""; 37 | list.each(function (i,elem) { 38 | let node = cheerio(cheerio(this)) 39 | let contentMain = node.find("div[class=contentMain]") 40 | let contentLeftPlist = contentMain.find("div[class=contentLeft]").find("p") 41 | let title = "" 42 | contentLeftPlist.each(function (i, pElement){ 43 | let tmpStr = cheerio(pElement).text() 44 | if(i === 0){ 45 | title = tmpStr 46 | } 47 | }) 48 | let listAddr = node.find("div[class=listAddr]") 49 | let addrLeft = listAddr.find("div[class=addrLeft]") 50 | let addrRight = listAddr.find("div[class=addrRight]") 51 | let port = "" 52 | if (addrRight.find("a[class=portHover]").length > 0){ 53 | port = addrRight.find("a[class=portHover]").text() 54 | } 55 | let protocol = "" 56 | if (addrRight.find("a[class~=protocolHover]").length > 0){ 57 | protocol = addrRight.find("a[class~=protocolHover]").text() 58 | }else{ 59 | if (port === "443"){ 60 | protocol = "https" 61 | }else{ 62 | protocol = "http" 63 | } 64 | } 65 | let host = "" 66 | let honeypot = "否" 67 | if (addrLeft.find("span[class=aSpan]").find("a").length === 0){ 68 | host = addrLeft.find("span[class=aSpan]").text() 69 | if (port !== ""){ 70 | host += (":" + port) 71 | } 72 | if(protocol !== ""){ 73 | host = protocol + "://" + host 74 | } 75 | }else{ 76 | host = addrLeft.find("span[class=aSpan]").find("a").text() 77 | if (host.indexOf("http") < 0){ 78 | if (port === "80"){ 79 | host = "http://"+host 80 | }else if (port === "443"){ 81 | host = "https://"+host 82 | } 83 | } 84 | let imgList = addrLeft.find("a").find("img") 85 | console.log(imgList) 86 | imgList.each(function (k, imgElement){ 87 | let imgElem = cheerio(imgElement) 88 | let aElemStyle = imgElem.parent().attr()['style'] 89 | let alt = imgElem.attr()['alt'] 90 | if (alt !== undefined && alt === "is honeypot" && aElemStyle.indexOf("display:none;") < 0){ 91 | honeypot = "是" 92 | } 93 | }) 94 | } 95 | let url = "" 96 | if (host.indexOf("http") > -1){ 97 | url = `` 98 | } 99 | 100 | let line = ` 101 | 102 | ${title} 103 | ${protocol} 104 | ${port} 105 | ${host} 106 | ${honeypot} 107 | ${url} 108 | 109 | `; 110 | innerHtml += line; 111 | }) 112 | document.getElementById("tbody").innerHTML = innerHtml; 113 | document.getElementById("zichanHost").setAttribute("href",newUrl); 114 | document.getElementById("cHost").setAttribute("href",cHost); 115 | layer.close(load); 116 | }) 117 | }; 118 | 119 | var template = (data) => { 120 | if(data == null){ 121 | //alert("请刷新"); 122 | layer.msg('请刷新Tab页面'); 123 | return 124 | } 125 | // console.log(data); 126 | var load = layer.load(0, {content: ""}); 127 | let json = JSON.stringify(data); 128 | let url = data.url; 129 | let ip = ""; 130 | if(domainReg.test(url)){ 131 | // 域名 132 | ip = url.replace("https://","").replace("http://",""); 133 | ip = ip.substr(0,ip.indexOf("/")); 134 | if(ip.indexOf(":") > 0){ 135 | ip = ip.substr(0,ip.indexOf(":")); 136 | } 137 | } 138 | let newUrl = baseFofaUrl+ip; 139 | axios({ 140 | method: 'get', 141 | url: newUrl, 142 | }).then(function (response) { 143 | let rspData = response.data; 144 | let root = cheerio.load(rspData); 145 | let rspIp = root("li[class=layui-this]").find("div[class=ellipise]").text() 146 | rspIp = rspIp.replace(/ /g,"").replace(/ /g, "").replace(/\n/g, "").replace(/\r/g,"").replace(/\t/g, "") 147 | let elementList = root("div[class~=ipDiv]") 148 | let country = "国家/地区:"; 149 | let city = "城市:"; 150 | let group = "组织:"; 151 | let asn = "ASN:"; 152 | let port = "端口:"; 153 | let protocol = "协议:"; 154 | elementList.each(function(i, elem) { 155 | let thisNode = cheerio(cheerio(this)) 156 | let nodeText = thisNode.text() 157 | console.log(nodeText+"=========") 158 | if(nodeText.indexOf("IP: ") === 0){ 159 | rspIp = nodeText.substring("IP: ".length).trim() 160 | }else if(nodeText.indexOf("国家/地区: ") === 0){ 161 | country += nodeText.substring("国家/地区: ".length).trim() 162 | }else if(nodeText.indexOf("城市: ") === 0){ 163 | city += nodeText.substring("城市: ".length).trim() 164 | }else if(nodeText.indexOf("组织: ") === 0){ 165 | group += nodeText.substring("组织: ".length).trim() 166 | }else if(nodeText.indexOf("ASN: ") === 0){ 167 | asn += nodeText.substring("ASN: ".length).trim() 168 | }else if(nodeText.indexOf("端口") === 0){ 169 | let portList = thisNode.find("a") 170 | let tmpPortList = []; 171 | portList.each(function (j, a){ 172 | let tmpPort = cheerio(cheerio(cheerio(this))).text(); 173 | tmpPort = tmpPort.trim().replace(" ","") 174 | if(tmpPort.indexOf("-") < 0){ 175 | tmpPortList.push(tmpPort) 176 | } 177 | }) 178 | port += tmpPortList.join(",") 179 | }else if(nodeText.indexOf("协议") === 0){ 180 | let protocolList = thisNode.find("a") 181 | let tmpProtocolList = []; 182 | protocolList.each(function (j, a){ 183 | let tmpProtocol = cheerio(cheerio(cheerio(this))).text(); 184 | tmpProtocol = tmpProtocol.trim().replace(" ","") 185 | if(tmpProtocol.indexOf("-") < 0){ 186 | tmpProtocolList.push(tmpProtocol) 187 | } 188 | }) 189 | protocol += tmpProtocolList.join(",") 190 | } 191 | }) 192 | if(port.endsWith(",")){ 193 | port = port.substring(0,port.length-2) 194 | } 195 | port = port.replace("端口:","") 196 | let splitPortArr = port.split(",") 197 | if (splitPortArr !== null && splitPortArr !== undefined && splitPortArr.length > 0){ 198 | port = "" 199 | for(let i=0; i${splitPortArr[i]}` 201 | port += tmpStr 202 | } 203 | } 204 | if(protocol.endsWith(",")){ 205 | protocol = protocol.substring(0,protocol.length-2) 206 | } 207 | protocol = protocol.replace("协议:","") 208 | let splitProtocolArr = protocol.split(",") 209 | if (splitProtocolArr !== null && splitProtocolArr !== undefined && splitProtocolArr.length > 0){ 210 | protocol = "" 211 | for(let i=0; i${splitProtocolArr[i]}` 213 | protocol += tmpStr 214 | } 215 | } 216 | if(rspIp === "" || rspIp.indexOf("无数据") > -1){ 217 | layer.close(load); 218 | layer.msg("无数据") 219 | return 220 | } 221 | port = "端口:" + port 222 | protocol = "协议:" + protocol 223 | document.getElementById("country").innerHTML = country; 224 | document.getElementById("city").innerHTML = city; 225 | document.getElementById("group").innerHTML = group; 226 | document.getElementById("asn").innerHTML = asn; 227 | document.getElementById("port").innerHTML = port; 228 | document.getElementById("protocol").innerHTML = protocol; 229 | document.getElementById("hostInfo").setAttribute("href",newUrl); 230 | getZichan(ipReg.exec(rspIp)[0],load); 231 | }); 232 | } 233 | 234 | ext.tabs.query({active: true, currentWindow: true}, function(tabs) { 235 | var activeTab = tabs[0]; 236 | // console.log(activeTab) 237 | chrome.tabs.sendMessage(activeTab.id, { action: 'process-page' }, template); 238 | }); 239 | 240 | -------------------------------------------------------------------------------- /src/scripts/utils/ext.js: -------------------------------------------------------------------------------- 1 | const apis = [ 2 | 'alarms', 3 | 'bookmarks', 4 | 'browserAction', 5 | 'commands', 6 | 'contextMenus', 7 | 'cookies', 8 | 'downloads', 9 | 'events', 10 | 'extension', 11 | 'extensionTypes', 12 | 'history', 13 | 'i18n', 14 | 'idle', 15 | 'notifications', 16 | 'pageAction', 17 | 'runtime', 18 | 'storage', 19 | 'tabs', 20 | 'webNavigation', 21 | 'webRequest', 22 | 'windows', 23 | ] 24 | 25 | function Extension () { 26 | const _this = this 27 | 28 | apis.forEach(function (api) { 29 | 30 | _this[api] = null 31 | 32 | try { 33 | if (chrome[api]) { 34 | _this[api] = chrome[api] 35 | } 36 | } catch (e) {} 37 | 38 | try { 39 | if (window[api]) { 40 | _this[api] = window[api] 41 | } 42 | } catch (e) {} 43 | 44 | try { 45 | if (browser[api]) { 46 | _this[api] = browser[api] 47 | } 48 | } catch (e) {} 49 | try { 50 | _this.api = browser.extension[api] 51 | } catch (e) {} 52 | }) 53 | 54 | try { 55 | if (browser && browser.runtime) { 56 | this.runtime = browser.runtime 57 | } 58 | } catch (e) {} 59 | 60 | try { 61 | if (browser && browser.browserAction) { 62 | this.browserAction = browser.browserAction 63 | } 64 | } catch (e) {} 65 | 66 | } 67 | 68 | module.exports = new Extension(); -------------------------------------------------------------------------------- /src/scripts/utils/storage.js: -------------------------------------------------------------------------------- 1 | import ext from "./ext"; 2 | 3 | module.exports = (ext.storage.sync ? ext.storage.sync : ext.storage.local); -------------------------------------------------------------------------------- /src/styles/modules/_grid.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * Gridism 3 | * A simple, responsive, and handy CSS grid by @cobyism 4 | * https://github.com/cobyism/gridism 5 | */ 6 | 7 | /* Preserve some sanity */ 8 | .grid, 9 | .unit { 10 | -webkit-box-sizing: border-box; 11 | -moz-box-sizing: border-box; 12 | box-sizing: border-box; 13 | } 14 | 15 | /* Set up some rules to govern the grid */ 16 | .grid { 17 | display: block; 18 | clear: both; 19 | } 20 | .grid .unit { 21 | float: left; 22 | width: 100%; 23 | padding: 10px; 24 | } 25 | 26 | /* This ensures the outer gutters are equal to the (doubled) inner gutters. */ 27 | .grid .unit:first-child { padding-left: 20px; } 28 | .grid .unit:last-child { padding-right: 20px; } 29 | 30 | /* Nested grids already have padding though, so let's nuke it */ 31 | .unit .unit:first-child { padding-left: 0; } 32 | .unit .unit:last-child { padding-right: 0; } 33 | .unit .grid:first-child > .unit { padding-top: 0; } 34 | .unit .grid:last-child > .unit { padding-bottom: 0; } 35 | 36 | /* Let people nuke the gutters/padding completely in a couple of ways */ 37 | .no-gutters .unit, 38 | .unit.no-gutters { 39 | padding: 0 !important; 40 | } 41 | 42 | /* Wrapping at a maximum width is optional */ 43 | .wrap .grid, 44 | .grid.wrap { 45 | max-width: 978px; 46 | margin: 0 auto; 47 | } 48 | 49 | /* Width classes also have shorthand versions numbered as fractions 50 | * For example: for a grid unit 1/3 (one third) of the parent width, 51 | * simply apply class="w-1-3" to the element. */ 52 | .grid .whole, .grid .w-1-1 { width: 100%; } 53 | .grid .half, .grid .w-1-2 { width: 50%; } 54 | .grid .one-third, .grid .w-1-3 { width: 33.3332%; } 55 | .grid .two-thirds, .grid .w-2-3 { width: 66.6665%; } 56 | .grid .one-quarter, 57 | .grid .one-fourth, .grid .w-1-4 { width: 25%; } 58 | .grid .three-quarters, 59 | .grid .three-fourths, .grid .w-3-4 { width: 75%; } 60 | .grid .one-fifth, .grid .w-1-5 { width: 20%; } 61 | .grid .two-fifths, .grid .w-2-5 { width: 40%; } 62 | .grid .three-fifths, .grid .w-3-5 { width: 60%; } 63 | .grid .four-fifths, .grid .w-4-5 { width: 80%; } 64 | .grid .golden-small, .grid .w-g-s { width: 38.2716%; } /* Golden section: smaller piece */ 65 | .grid .golden-large, .grid .w-g-l { width: 61.7283%; } /* Golden section: larger piece */ 66 | 67 | /* Clearfix after every .grid */ 68 | .grid { 69 | *zoom: 1; 70 | } 71 | .grid:before, .grid:after { 72 | display: table; 73 | content: ""; 74 | line-height: 0; 75 | } 76 | .grid:after { 77 | clear: both; 78 | } 79 | 80 | /* Utility classes */ 81 | .align-center { text-align: center; } 82 | .align-left { text-align: left; } 83 | .align-right { text-align: right; } 84 | .pull-left { float: left; } 85 | .pull-right { float: right; } 86 | 87 | /* A property for a better rendering of images in units: in 88 | this way bigger pictures are just resized if the unit 89 | becomes smaller */ 90 | .unit img { 91 | max-width: 100%; 92 | } 93 | 94 | /* Hide elements using this class by default */ 95 | .only-on-mobiles { 96 | display: none !important; 97 | } 98 | 99 | /* Responsive Stuff */ 100 | @media screen and (max-width: 568px) { 101 | /* Stack anything that isn't full-width on smaller screens 102 | and doesn't provide the no-stacking-on-mobiles class */ 103 | .grid:not(.no-stacking-on-mobiles) > .unit { 104 | width: 100% !important; 105 | padding-left: 20px; 106 | padding-right: 20px; 107 | } 108 | .unit .grid .unit { 109 | padding-left: 0px; 110 | padding-right: 0px; 111 | } 112 | 113 | /* Sometimes, you just want to be different on small screens */ 114 | .center-on-mobiles { 115 | text-align: center !important; 116 | } 117 | .hide-on-mobiles { 118 | display: none !important; 119 | } 120 | .only-on-mobiles { 121 | display: block !important; 122 | } 123 | } 124 | 125 | /* Expand the wrap a bit further on larger screens */ 126 | @media screen and (min-width: 1180px) { 127 | .wider .grid, 128 | .grid.wider { 129 | max-width: 1180px; 130 | margin: 0 auto; 131 | } 132 | } -------------------------------------------------------------------------------- /src/styles/modules/_layout.scss: -------------------------------------------------------------------------------- 1 | html, body { 2 | box-sizing: border-box; 3 | &:before, &:after { 4 | box-sizing: border-box; 5 | } 6 | } 7 | 8 | body { 9 | font-family: $font-family-base; 10 | line-height: $line-height-base; 11 | font-size: $font-size-base; 12 | color: $text-color; 13 | font-weight: normal; 14 | } 15 | 16 | h1, h2, h3, h4, h5, h6 { 17 | font-family: $headings-font-family; 18 | font-weight: $headings-font-weight; 19 | line-height: $headings-line-height; 20 | margin: 0; 21 | padding: 0; 22 | } 23 | 24 | h1 { font-size: 1.75em; } 25 | h2 { font-size: 1.5em; } 26 | h3 { font-size: 1.25em; } 27 | h4 { font-size: 1.10em; } 28 | h5 { font-size: 1em; } 29 | h6 { font-size: .85em; } 30 | 31 | nav { 32 | margin: 1em 0; 33 | 34 | ul { 35 | list-style: none; 36 | margin: 0; 37 | padding: 0; 38 | 39 | li { 40 | display: inline-block; 41 | margin-right: 1em; 42 | margin-bottom: .25em; 43 | } 44 | } 45 | } 46 | 47 | a { 48 | text-decoration: none; 49 | color: $brand-primary; 50 | &:hover, &:focus { 51 | color: darken($brand-primary, 6.25%); 52 | } 53 | } 54 | 55 | ul, ol { 56 | margin-top: 0; 57 | padding-top: 0; 58 | padding-left: 2.5em; 59 | } 60 | 61 | p { 62 | margin: 1em 0; 63 | hyphens: auto; 64 | 65 | &.lead { 66 | font-size: 1.2em; 67 | } 68 | 69 | &:first-child { 70 | margin-top: 0; 71 | } 72 | 73 | &:last-child { 74 | margin-bottom: 0; 75 | } 76 | 77 | + ul, + ol { 78 | margin-top: -.75em; 79 | } 80 | } 81 | 82 | dd { 83 | margin-bottom: 1em; 84 | margin-left: 0; 85 | padding-left: 2.5em; 86 | } 87 | 88 | dt { 89 | font-weight: 700; 90 | } 91 | 92 | blockquote { 93 | margin: 0; 94 | padding-left: 2.5em; 95 | } -------------------------------------------------------------------------------- /src/styles/modules/_reset.scss: -------------------------------------------------------------------------------- 1 | /* 2 | App reset by Ben Frain @benfrain / benfrain.com 3 | Slightly modified by Bharani @bharani91 / github.com/bharani91 4 | */ 5 | 6 | /*Hat tip to @thierrykoblentz for this approach: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */ 7 | html { 8 | box-sizing: border-box; 9 | } 10 | 11 | * { 12 | -webkit-tap-highlight-color: rgba(255,255,255,0); 13 | -webkit-tap-highlight-color: transparent; 14 | box-sizing: inherit; 15 | } 16 | 17 | *:before, 18 | *:after { 19 | box-sizing: inherit; 20 | } 21 | 22 | input[type], 23 | [contenteditable] { 24 | user-select: text; 25 | } 26 | 27 | body, 28 | h1, 29 | h2, 30 | h3, 31 | h4, 32 | h5, 33 | h6, 34 | p { 35 | margin: 0; 36 | font-size: 1rem; 37 | font-weight: 400; 38 | } 39 | 40 | a { 41 | text-decoration: none; 42 | color: inherit; 43 | } 44 | 45 | /*IMPORTANT: This removes the focus outline for most browsers. Be aware this is a backwards accessibilty step! Mozilla (i.e. Firefox) also adds a dotted outline around a tags and buttons when they receive tab focus which I haven't found an unhacky way of removing.*/ 46 | a:focus, 47 | button:focus { 48 | outline: 0; 49 | } 50 | 51 | button { 52 | appearance: none; 53 | background-color: transparent; 54 | border: 0; 55 | padding: 0; 56 | } 57 | 58 | input, 59 | fieldset { 60 | appearance: none; 61 | border: 0; 62 | padding: 0; 63 | margin: 0; 64 | min-width: 0; 65 | font-size: 1rem; 66 | font-family: inherit; 67 | } 68 | 69 | /*This switches the default outline off when an input receives focus (really important for users tabbing through with a keyboard) so ensure you put something decent in for your input focus instead!!*/ 70 | input:focus { 71 | outline: 0; 72 | } 73 | 74 | img { 75 | max-width: 100%; 76 | display: block; 77 | } 78 | 79 | /*Removes the default focusring that Mozilla places on select items. From: http://stackoverflow.com/a/18853002/1147859 80 | Ensure you set `#000` to the colour you want your text to appear */ 81 | select:-moz-focusring { 82 | color: transparent; 83 | text-shadow: 0 0 0 #000; 84 | } 85 | -------------------------------------------------------------------------------- /src/styles/modules/_utilities.scss: -------------------------------------------------------------------------------- 1 | .text-muted { 2 | color: $text-secondary; 3 | } 4 | 5 | .text-center { 6 | text-align: center; 7 | } -------------------------------------------------------------------------------- /src/styles/modules/_variables.scss: -------------------------------------------------------------------------------- 1 | // Colors 2 | $black: #111111; 3 | $white: #ffffff; 4 | $gray: #eeeeee; 5 | $brand-primary: #4990E2; 6 | $text-color: $black; 7 | $text-secondary: #7A7A7A; 8 | 9 | 10 | // Typography 11 | $font-family-base: "Helvetica Neue", Helvetica, Arial, sans-serif; 12 | $headings-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 13 | $font-size-base: 16px; 14 | $line-height-base: 1.5; 15 | $headings-font-weight: 500; 16 | $headings-line-height: 1.1; 17 | $headings-color: $text-color; -------------------------------------------------------------------------------- /src/styles/options.scss: -------------------------------------------------------------------------------- 1 | @import "modules/reset"; 2 | @import "modules/variables"; 3 | @import "modules/grid"; 4 | @import "modules/layout"; 5 | @import "modules/utilities"; 6 | 7 | .heading { 8 | margin: 1em auto; 9 | padding-bottom: 1em; 10 | border-bottom: 1px solid #eee; 11 | 12 | h1 + .lead { 13 | margin-top: 0.2em; 14 | } 15 | } 16 | 17 | .content { 18 | min-height: 300px; 19 | } 20 | 21 | .option { 22 | margin: 1em auto; 23 | h5 { 24 | margin-bottom: 1em; 25 | } 26 | 27 | .radio-group { 28 | label { 29 | display: block; 30 | } 31 | input[type="radio"] { 32 | display: inline-block; 33 | margin: 3px 5px; 34 | } 35 | } 36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/styles/popup.scss: -------------------------------------------------------------------------------- 1 | @import "modules/reset"; 2 | @import "modules/variables"; 3 | @import "modules/layout"; 4 | 5 | body, html { 6 | padding: 0; 7 | margin: 0; 8 | } 9 | 10 | #app { 11 | padding: 20px 20px; 12 | background: $white; 13 | } 14 | 15 | footer { 16 | color: $text-secondary; 17 | text-align: right; 18 | font-size: 0.8em; 19 | a { 20 | outline: none; 21 | color: lighten($text-secondary, 10%); 22 | &:hover { 23 | color: $text-secondary; 24 | } 25 | } 26 | } 27 | 28 | .popup-content { 29 | min-width: 600px; 30 | min-height: 100%; 31 | max-width: 1000px; 32 | } 33 | 34 | .app-name { 35 | font-size: 14px; 36 | color: $text-secondary; 37 | text-align: left; 38 | margin: 0 auto 1em auto; 39 | padding: 0; 40 | } 41 | 42 | .site-description { 43 | padding: 0.5em; 44 | border: 1px solid $gray; 45 | margin: 0; 46 | 47 | h3 { 48 | margin: 0; 49 | padding: 0; 50 | border-bottom: 1px solid $gray; 51 | padding-bottom: 0.5em; 52 | } 53 | 54 | .description { 55 | color: $text-secondary; 56 | max-height: 100px; 57 | font-size: 0.8em; 58 | line-height: 1.2; 59 | margin-top: 10px; 60 | } 61 | 62 | .url { 63 | outline: none; 64 | text-decoration: none; 65 | line-height: 1.2; 66 | font-size: 0.8em; 67 | word-break: break-word; 68 | display: block; 69 | } 70 | } 71 | 72 | .action-container { 73 | margin: 1em auto; 74 | } 75 | 76 | .btn { 77 | background: none; 78 | border: none; 79 | display: inline-block; 80 | cursor: pointer; 81 | padding: 0.5em 1.5em; 82 | background: $brand-primary; 83 | color: $white; 84 | font-weight: $headings-font-weight; 85 | border-radius: 2px; 86 | outline: none; 87 | font-size: 1em; 88 | } 89 | --------------------------------------------------------------------------------