├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .gitattributes ├── .github └── workflows │ ├── lint-css.yml │ └── lint-js.yml ├── .gitignore ├── .stylelintignore ├── .stylelintrc.json ├── CODEOWNERS ├── LICENSE ├── README.de.md ├── README.es.md ├── README.md ├── create-archive.bat ├── create-archive.sh ├── img ├── available-in-the-chrome-web-store.png └── seo-insights-header.png ├── jsconfig.json ├── package-lock.json ├── package.json └── src ├── _locales ├── de │ └── messages.json ├── en │ └── messages.json └── es │ └── messages.json ├── content.js ├── icon128.png ├── icon16.png ├── icon48.png ├── img └── bg-img-pattern.png ├── libs ├── bootstrap.bundle.min.js ├── bootstrap.min.css └── jquery-3.7.1.min.js ├── manifest.json ├── popup.css ├── popup.html ├── popup.js └── scripts ├── files.js ├── head.js ├── heading.js ├── helper.js ├── image.js ├── link.js └── meta.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [{*.json,*.js,*.html,*.css}] 4 | charset = utf-8 5 | indent_style = tab 6 | indent_size = tab 7 | tab_width = 2 8 | end_of_line = lf 9 | trim_trailing_whitespace = true 10 | 11 | [{*.json,*.js,*.css}] 12 | insert_final_newline = true -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | src/libs -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2021": true, 5 | "jquery": true, 6 | "webextensions": true 7 | }, 8 | "parserOptions": { 9 | "ecmaVersion": 12 10 | }, 11 | "rules": { 12 | "block-scoped-var": "error", 13 | "camelcase": "error", 14 | "comma-dangle": ["error", { 15 | "arrays": "always-multiline", 16 | "objects": "always-multiline", 17 | "imports": "always-multiline", 18 | "exports": "always-multiline", 19 | "functions": "always-multiline" 20 | }], 21 | "comma-spacing": ["error", { "before": false, "after": true }], 22 | "id-length": "error", 23 | "indent": ["error", "tab", { "SwitchCase": 1 }], 24 | "key-spacing": ["error", { "beforeColon": false }], 25 | "linebreak-style": ["error", "unix"], 26 | "new-cap": "error", 27 | "no-array-constructor": "error", 28 | "no-eval": "error", 29 | "no-multiple-empty-lines": ["error", { "max": 1 }], 30 | "no-new-object": "error", 31 | "no-trailing-spaces": "error", 32 | "no-underscore-dangle": "error", 33 | "no-unused-vars": "error", 34 | "no-useless-concat": "error", 35 | "no-useless-escape": "error", 36 | "prefer-const": "error", 37 | "prefer-template": "error", 38 | "semi": ["error", "always"], 39 | "space-before-blocks": ["error", "always"], 40 | "space-before-function-paren": ["error", "never"], 41 | "spaced-comment": ["error", "always"], 42 | "template-curly-spacing": ["error", "never"] 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | *.{png} binary -------------------------------------------------------------------------------- /.github/workflows/lint-css.yml: -------------------------------------------------------------------------------- 1 | name: Lint CSS 2 | 3 | on: 4 | push: 5 | 6 | jobs: 7 | lint: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v2 13 | 14 | - name: Setup Node.js 15 | uses: actions/setup-node@v2 16 | with: 17 | node-version: '17' 18 | cache: 'npm' 19 | 20 | - name: Dependencies 21 | run: npm ci 22 | 23 | - name: Lint 24 | run: npm run css-stylelint -------------------------------------------------------------------------------- /.github/workflows/lint-js.yml: -------------------------------------------------------------------------------- 1 | name: Lint JS 2 | 3 | on: 4 | push: 5 | 6 | jobs: 7 | lint: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v2 13 | 14 | - name: Setup Node.js 15 | uses: actions/setup-node@v2 16 | with: 17 | node-version: '17' 18 | cache: 'npm' 19 | 20 | - name: Dependencies 21 | run: npm ci 22 | 23 | - name: Lint 24 | run: npm run js-eslint -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | seo-insights.zip 3 | *.pem -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | src/libs -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard", 3 | "plugins": [ 4 | "stylelint-order" 5 | ], 6 | "rules": { 7 | "block-no-empty": true, 8 | "color-no-invalid-hex": true, 9 | "declaration-no-important": true, 10 | "declaration-property-value-no-unknown": true, 11 | "no-descending-specificity": null, 12 | "order/properties-alphabetical-order": true, 13 | "rule-empty-line-before": "never", 14 | "selector-pseudo-class-no-unknown": true, 15 | "selector-pseudo-element-no-unknown": true, 16 | "shorthand-property-no-redundant-values": true, 17 | "unit-no-unknown": true, 18 | "value-keyword-case": "lower" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @sebastianbrosch -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.de.md: -------------------------------------------------------------------------------- 1 | ![](img/seo-insights-header.png) 2 | 3 | [![Chrome Web Store](https://img.shields.io/chrome-web-store/v/nlkopdpfkbifcibdoecnfabipofhnoom?style=flat-square)](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=de) 4 | [![Chrome Web Store](https://img.shields.io/chrome-web-store/users/nlkopdpfkbifcibdoecnfabipofhnoom?style=flat-square)](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=de) 5 | [![GitHub](https://img.shields.io/github/license/seo-insights/seo-insights?style=flat-square)](https://github.com/SEO-Insights/seo-insights/blob/main/LICENSE) 6 | 7 | SEO Insights ist eine Chrome Extension um auf einen Blick die wichtigsten Informationen einer Website anzeigen zu können. 8 | 9 | *Read this in other languages: [English](README.md), [Deutsch](README.de.md), [Español](README.es.md)* 10 | 11 | ### :star: Funktionen 12 | 13 | * Übersicht (Meta-Beschreibung, Titel, Canonical, usw.) 14 | * Überschriften (inkl. Anzahl der Buchstaben und Wörter) 15 | * Meta-Informationen (Open Graph, Twitter, Dublin Core, Parse.ly, usw.) 16 | * Bilder (Bildgröße, Alternativtext, Titel, Domains) 17 | * Links (Protokolle, externe und interne Links, Preload und DNS Prefetch) 18 | * Dateien (Stylesheets, JavaScript, spezielle Dateien) 19 | * HTTP-Header-Informationen 20 | * Links zu diversen Tools 21 | - [Google Page Speed Insights](https://developers.google.com/speed/pagespeed/insights/) 22 | - [W3C CSS Validation Service](https://jigsaw.w3.org/css-validator/) 23 | - [Nu Html Checker](https://validator.w3.org/nu/) 24 | - [GTmetrix](https://gtmetrix.com/) 25 | - [Test für Rich-Suchergebnisse](https://search.google.com/test/rich-results) 26 | - [Test auf Optimierung für Mobilgeräte](https://search.google.com/test/mobile-friendly) 27 | - [Security Headers](https://securityheaders.com/) 28 | - [SSL Server Test (Powered by Qualys SSL Labs)](https://www.ssllabs.com/ssltest/) 29 | * Verfügbar in Englisch, Deutsch und Spanisch 30 | 31 | ### :rocket: Chrome Web Store 32 | 33 | SEO Insights steht im [Chrome Web Store](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=de) zur Verfügung und kann darüber in Google Chrome sowie dem Microsoft Edge installiert werden. Um die aktuelle Entwicklungsversion testen zu können, steht [hier eine Anleitung](https://github.com/SEO-Insights/seo-insights/wiki/Development-de-DE) zur Verfügung. 34 | 35 | [![Available in the Chrome Web Store](img/available-in-the-chrome-web-store.png)](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=de) 36 | 37 | ### :hammer_and_wrench: Verwendete Bibliotheken 38 | 39 | * jQuery 3.7.1 ([Website](https://jquery.com/) - [GitHub](https://github.com/jquery/jquery)) 40 | * Bootstrap 5.3.3 ([Website](https://getbootstrap.com/docs/5.3/getting-started/introduction/) - [GitHub](https://github.com/twbs/bootstrap)) 41 | 42 | ### :tada: Neue Funktionen 43 | 44 | SEO Insights befindet sich in aktiver Entwicklung und erhält mit der Zeit Verbesserungen und neue Funktionen. Sie können kommende Funktionen unter dem [aktuellen Milestone](https://github.com/SEO-Insights/seo-insights/milestone/7) oder in der [Übersicht der Issues](https://github.com/SEO-Insights/seo-insights/issues) einsehen. -------------------------------------------------------------------------------- /README.es.md: -------------------------------------------------------------------------------- 1 | ![](img/seo-insights-header.png) 2 | 3 | [![Chrome Web Store](https://img.shields.io/chrome-web-store/v/nlkopdpfkbifcibdoecnfabipofhnoom?style=flat-square)](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=es) 4 | [![Chrome Web Store](https://img.shields.io/chrome-web-store/users/nlkopdpfkbifcibdoecnfabipofhnoom?style=flat-square)](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=es) 5 | [![GitHub](https://img.shields.io/github/license/seo-insights/seo-insights?style=flat-square)](https://github.com/SEO-Insights/seo-insights/blob/main/LICENSE) 6 | 7 | SEO Insights es una extensión para Chrome que permite visualizar la información más relevante de un sitio web. 8 | 9 | _Leer en otros idomas: [Inglés](README.md), [Alemán](README.de.md), [Español](README.es.md)_ 10 | 11 | ### :star: Características 12 | 13 | - Resumen / Vista general (descripción meta, título, canónico, etc.) 14 | - Encabezados (con contador de caracteres y palabras) 15 | - Meta (Open Graph, Twitter, Dublin Core, Parse.ly, etc.) 16 | - Imágenes (tamaño de imagen, atributo, título, dominios) 17 | - Hipervínculos (protocolos, hipervínculo externo e interno, elemento precargado y DNS prefetch) 18 | - Archivos (hojas de estilo, JavaScript, archivos especiales) 19 | - Cabecera HTTP 20 | - Herramientas 21 | - [Google Page Speed Insights](https://developers.google.com/speed/pagespeed/insights/) 22 | - [W3C CSS Validation Service](https://jigsaw.w3.org/css-validator/) 23 | - [Nu Html Checker](https://validator.w3.org/nu/) 24 | - [GTmetrix](https://gtmetrix.com/) 25 | - [Prueba de Resultados enriquecidos](https://search.google.com/test/rich-results) 26 | - [Mobile-Friendly Test](https://search.google.com/test/mobile-friendly) 27 | - [Security Headers](https://securityheaders.com/) 28 | - [SSL Server Test (Desarrollado por Qualys SSL Labs)](https://www.ssllabs.com/ssltest/) 29 | - Disponible en inglés, alemán y español 30 | 31 | ### :rocket: Chrome Web Store 32 | 33 | SEO Insights está disponible en la [Chrome Web Store](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=es) y se puede instalar en Google Chrome y Microsoft Edge. Las instrucciones para probar la versión actual de desarrollo están [disponibles aquí](https://github.com/SEO-Insights/seo-insights/wiki/Development). 34 | 35 | [![Disponible en la Chrome Web Store](img/available-in-the-chrome-web-store.png)](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=es) 36 | 37 | ### :hammer_and_wrench: Bibliotecas utilizadas 38 | 39 | - jQuery 3.7.1 ([Sitio web](https://jquery.com/) - [GitHub](https://github.com/jquery/jquery)) 40 | - Bootstrap 5.3.3 ([Sitio web](https://getbootstrap.com/docs/5.3/getting-started/introduction/) - [GitHub](https://github.com/twbs/bootstrap)) 41 | 42 | ### :tada: Próximas características 43 | 44 | SEO Insights está en desarrollo constante, por lo que recibe mejoras y nuevas funciones con el tiempo. Puedes ver las próximas características en [el hito actual](https://github.com/SEO-Insights/seo-insights/milestone/7) o en [la vista general de incidencias](https://github.com/SEO-Insights/seo-insights/issues). -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](img/seo-insights-header.png) 2 | 3 | [![Chrome Web Store](https://img.shields.io/chrome-web-store/v/nlkopdpfkbifcibdoecnfabipofhnoom?style=flat-square)](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=en) 4 | [![Chrome Web Store](https://img.shields.io/chrome-web-store/users/nlkopdpfkbifcibdoecnfabipofhnoom?style=flat-square)](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=en) 5 | [![GitHub](https://img.shields.io/github/license/seo-insights/seo-insights?style=flat-square)](https://github.com/SEO-Insights/seo-insights/blob/main/LICENSE) 6 | 7 | SEO Insights is a Chrome extension to display the most important information of a website at a glance. 8 | 9 | *Read this in other languages: [English](README.md), [Deutsch](README.de.md), [Español](README.es.md)* 10 | 11 | ### :star: Features 12 | 13 | * Summary / Overview (meta description, title, canonical, etc.) 14 | * Headings (with count of chars and words) 15 | * Meta (Open Graph, Twitter, Dublin Core, Parse.ly, etc.) 16 | * Images (image size, alternative, title, domains) 17 | * Hyperlinks (protocols, external and internal hyperlink, preload und DNS prefetch) 18 | * Files (stylesheets, JavaScript, special files) 19 | * HTTP-Header 20 | * Tools 21 | - [Google Page Speed Insights](https://developers.google.com/speed/pagespeed/insights/) 22 | - [W3C CSS Validation Service](https://jigsaw.w3.org/css-validator/) 23 | - [Nu Html Checker](https://validator.w3.org/nu/) 24 | - [GTmetrix](https://gtmetrix.com/) 25 | - [Rich Results Test](https://search.google.com/test/rich-results) 26 | - [Mobile-Friendly Test](https://search.google.com/test/mobile-friendly) 27 | - [Security Headers](https://securityheaders.com/) 28 | - [SSL Server Test (Powered by Qualys SSL Labs)](https://www.ssllabs.com/ssltest/) 29 | * Available in English, German and Spanish 30 | 31 | ### :rocket: Chrome Web Store 32 | 33 | SEO Insights is available in the [Chrome Web Store](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=en) and can be installed in Google Chrome and Microsoft Edge. To test the current development version, instructions are [available here](https://github.com/SEO-Insights/seo-insights/wiki/Development). 34 | 35 | [![Available in the Chrome Web Store](img/available-in-the-chrome-web-store.png)](https://chromewebstore.google.com/detail/seo-insights/nlkopdpfkbifcibdoecnfabipofhnoom?hl=en) 36 | 37 | ### :hammer_and_wrench: Used libraries 38 | 39 | * jQuery 3.7.1 ([Website](https://jquery.com/) - [GitHub](https://github.com/jquery/jquery)) 40 | * Bootstrap 5.3.3 ([Website](https://getbootstrap.com/docs/5.3/getting-started/introduction/) - [GitHub](https://github.com/twbs/bootstrap)) 41 | 42 | ### :tada: Upcoming Features 43 | 44 | SEO Insights is in active development and gets improvements and new features over time. You can see upcoming features on [the current milestone](https://github.com/SEO-Insights/seo-insights/milestone/7) or the [issue overview](https://github.com/SEO-Insights/seo-insights/issues). 45 | -------------------------------------------------------------------------------- /create-archive.bat: -------------------------------------------------------------------------------- 1 | del seo-insights.zip 2 | 7z a seo-insights.zip .\src\* -------------------------------------------------------------------------------- /create-archive.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm -f seo-insights.zip 3 | (cd src && zip -r ../seo-insights.zip .) -------------------------------------------------------------------------------- /img/available-in-the-chrome-web-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SEO-Insights/seo-insights/e63311ab5e2f8288fbc4d430b6c48fcdbe365b96/img/available-in-the-chrome-web-store.png -------------------------------------------------------------------------------- /img/seo-insights-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SEO-Insights/seo-insights/e63311ab5e2f8288fbc4d430b6c48fcdbe365b96/img/seo-insights-header.png -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "typeAcquisition": { 3 | "include": [ 4 | "chrome", 5 | "jquery" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seo-insights", 3 | "version": "0.0.6", 4 | "description": "SEO Insights is a Chrome extension to display the most important information of a website at a glance.", 5 | "scripts": { 6 | "css-stylelint": "stylelint src/**/*.{css,scss}", 7 | "js-eslint": "eslint src/**/*.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/SEO-Insights/seo-insights.git" 12 | }, 13 | "keywords": [ 14 | "chrome-extension", 15 | "chrome", 16 | "seo", 17 | "edge", 18 | "seotools", 19 | "seo-optimization", 20 | "edge-extension", 21 | "seo-analysis", 22 | "seo-tools", 23 | "seo-insights" 24 | ], 25 | "author": "chrome-extensions@sebastianbrosch.de", 26 | "license": "GPL-3.0-only", 27 | "bugs": { 28 | "url": "https://github.com/SEO-Insights/seo-insights/issues" 29 | }, 30 | "homepage": "https://github.com/SEO-Insights/seo-insights#readme", 31 | "devDependencies": { 32 | "eslint": "^8.56.0", 33 | "eslint-config-airbnb-base": "^15.0.0", 34 | "stylelint": "^16.2.0", 35 | "stylelint-config-standard": "^36.0.0", 36 | "stylelint-order": "^6.0.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/_locales/de/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_description": { 3 | "message": "SEO Insights ist eine Erweiterung, um Informationen zur Analyse und Optimierung der aktuellen Website zu erhalten." 4 | }, 5 | "summary": { 6 | "message": "Übersicht" 7 | }, 8 | "hint": { 9 | "message": "Hinweis" 10 | }, 11 | "cant_use": { 12 | "message": "SEO Insights kann in diesem Tab nicht verwendet werden." 13 | }, 14 | "headings": { 15 | "message": "Überschriften" 16 | }, 17 | "images": { 18 | "message": "Bilder" 19 | }, 20 | "images_lc": { 21 | "message": "Bilder" 22 | }, 23 | "icons": { 24 | "message": "Icons" 25 | }, 26 | "icons_lc": { 27 | "message": "icons" 28 | }, 29 | "links_lc": { 30 | "message": "Links" 31 | }, 32 | "files": { 33 | "message": "Dateien" 34 | }, 35 | "tools": { 36 | "message": "Tools" 37 | }, 38 | "errors_warnings_hints": { 39 | "message": "Fehler, Warnungen und Hinweise" 40 | }, 41 | "others": { 42 | "message": "Sonstige" 43 | }, 44 | "others_lc": { 45 | "message": "andere" 46 | }, 47 | "words": { 48 | "message": "Wörter" 49 | }, 50 | "chars": { 51 | "message": "Zeichen" 52 | }, 53 | "emojis": { 54 | "message": "Emojis" 55 | }, 56 | "items": { 57 | "message": "Elemente" 58 | }, 59 | "all": { 60 | "message": "alle" 61 | }, 62 | "without": { 63 | "message": "ohne" 64 | }, 65 | "internal": { 66 | "message": "Intern" 67 | }, 68 | "external": { 69 | "message": "Extern" 70 | }, 71 | "unique": { 72 | "message": "eindeutig" 73 | }, 74 | "no_heading_items": { 75 | "message": "Diese Website hat keine Überschriften." 76 | }, 77 | "no_file_items": { 78 | "message": "Diese Website hat keine Dateien." 79 | }, 80 | "no_summary_items": { 81 | "message": "Diese Website hat keine Meta Elemente um in der Übersicht anzuzeigen." 82 | }, 83 | "no_meta_items": { 84 | "message": "Diese Website hat keine Meta Elemente." 85 | }, 86 | "no_items": { 87 | "message": "Diese Website hat keine $type$.", 88 | "placeholders": { 89 | "type": { 90 | "content": "$1" 91 | } 92 | } 93 | }, 94 | "no_alternate_items": { 95 | "message": "Diese Website hat keine alternate Elemente." 96 | }, 97 | "no_domain_items": { 98 | "message": "Diese Website hat keine $type$ mit Domains.", 99 | "placeholders": { 100 | "type": { 101 | "content": "$1" 102 | } 103 | } 104 | }, 105 | "save": { 106 | "message": "Speichern" 107 | }, 108 | "no_preconnect_items": { 109 | "message": "Diese Website hat keine preconnect Elemente." 110 | }, 111 | "no_dns_prefetch_items": { 112 | "message": "Diese Website hat keine DNS prefetch Elemente." 113 | }, 114 | "no_preload_items": { 115 | "message": "Diese Website hat keine preload Elemente." 116 | }, 117 | "tools_gsc_mobile_friendly_title": { 118 | "message": "Test auf Optimierung für Mobilgeräte – Google Search Console" 119 | }, 120 | "tools_gsc_mobile_friendly_description": { 121 | "message": "Teste, wie einfach die Nutzung deiner Seite auf einem Mobilgerät für Besucher ist." 122 | }, 123 | "tools_gsc_rich_results_title": { 124 | "message": "Test für Rich-Suchergebnisse – Google Search Console" 125 | }, 126 | "tools_gsc_rich_results_description": { 127 | "message": "Teste deine öffentlich zugängliche Seite, um herauszufinden, welche Rich-Suchergebnisse über die darin enthaltenen strukturierten Daten generiert werden können." 128 | }, 129 | "tools_gtmetrix_title": { 130 | "message": "GTmetrix | Website Performance Testing and Monitoring" 131 | }, 132 | "tools_gtmetrix_description": { 133 | "message": "GTmetrix ist ein kostenloses Tool zum Testen und Überwachen der Leistung Ihrer Seite. Mit Lighthouse generiert GTmetrix Ergebnisse für Ihre Seiten und bietet umsetzbare Empfehlungen zur Optimierung." 134 | }, 135 | "tools_nu_html_checker_title": { 136 | "message": "Nu Html Checker" 137 | }, 138 | "tools_nu_html_checker_description": { 139 | "message": "Mit diesem Tool kann das HTML-Markup einer Website überprüft und verbessert werden." 140 | }, 141 | "tools_w3c_css_validation_title": { 142 | "message": "W3C CSS Validation Service" 143 | }, 144 | "tools_w3c_css_validation_description": { 145 | "message": "Der W3C CSS Validator ist freie Software des W3C, die Webdesignern und Webentwicklern dabei helfen soll, ihre Cascading Style Sheets (CSS) zu überprüfen." 146 | }, 147 | "tools_pagespeed_insights_title": { 148 | "message": "PageSpeed Insights" 149 | }, 150 | "tools_pagespeed_insights_description": { 151 | "message": "PageSpeed Insights analysiert den Inhalt einer Webseite und erstellt dann Vorschläge zur Verbesserung der Geschwindigkeit dieser Seite." 152 | }, 153 | "tools_securityheaders_title": { 154 | "message": "Security Headers" 155 | }, 156 | "tools_securityheaders_description": { 157 | "message": "Security Headers ist ein Tool zur Ermittlung der HTTP Response Header. Es wird dabei auch überprüft ob die wichtigsten Header vorhanden sind." 158 | }, 159 | "tools_ssl_server_test_title": { 160 | "message": "SSL Server Test (Powered by Qualys SSL Labs)" 161 | }, 162 | "tools_ssl_server_test_description": { 163 | "message": "Der SSL-Server-Test ist ein Online-Dienst, mit dem Sie die Konfiguration jedes öffentlichen SSL-Webservers überprüfen können." 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /src/_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_description": { 3 | "message": "SEO Insights is an extension to get information for analysis and optimization of the current website." 4 | }, 5 | "summary": { 6 | "message": "Summary" 7 | }, 8 | "hint": { 9 | "message": "Hint" 10 | }, 11 | "cant_use": { 12 | "message": "SEO Insights can not be used in this tab." 13 | }, 14 | "headings": { 15 | "message": "Headings" 16 | }, 17 | "images": { 18 | "message": "Images" 19 | }, 20 | "images_lc": { 21 | "message": "images" 22 | }, 23 | "icons": { 24 | "message": "Icons" 25 | }, 26 | "icons_lc": { 27 | "message": "icons" 28 | }, 29 | "links_lc": { 30 | "message": "links" 31 | }, 32 | "files": { 33 | "message": "Files" 34 | }, 35 | "tools": { 36 | "message": "Tools" 37 | }, 38 | "errors_warnings_hints": { 39 | "message": "Errors, Warnings and Hints" 40 | }, 41 | "others": { 42 | "message": "Other" 43 | }, 44 | "others_lc": { 45 | "message": "other" 46 | }, 47 | "words": { 48 | "message": "words" 49 | }, 50 | "chars": { 51 | "message": "chars" 52 | }, 53 | "emojis": { 54 | "message": "emojis" 55 | }, 56 | "items": { 57 | "message": "items" 58 | }, 59 | "all": { 60 | "message": "all" 61 | }, 62 | "without": { 63 | "message": "without" 64 | }, 65 | "internal": { 66 | "message": "internal" 67 | }, 68 | "external": { 69 | "message": "external" 70 | }, 71 | "unique": { 72 | "message": "unique" 73 | }, 74 | "no_heading_items": { 75 | "message": "This website has no heading elements." 76 | }, 77 | "no_summary_items": { 78 | "message": "This website has no meta elements to display on summary." 79 | }, 80 | "no_file_items": { 81 | "message": "This website has no file elements." 82 | }, 83 | "no_meta_items": { 84 | "message": "This website has no meta elements." 85 | }, 86 | "no_items": { 87 | "message": "This website has no $type$.", 88 | "placeholders": { 89 | "type": { 90 | "content": "$1" 91 | } 92 | } 93 | }, 94 | "no_alternate_items": { 95 | "message": "This website has no alternate links." 96 | }, 97 | "no_domain_items": { 98 | "message": "This website has no $type$ with domains.", 99 | "placeholders": { 100 | "type": { 101 | "content": "$1" 102 | } 103 | } 104 | }, 105 | "save": { 106 | "message": "Save" 107 | }, 108 | "no_preconnect_items": { 109 | "message": "This website has no preconnect elements." 110 | }, 111 | "no_dns_prefetch_items": { 112 | "message": "This website has no DNS prefetch elements." 113 | }, 114 | "no_preload_items": { 115 | "message": "This website has no preload elements." 116 | }, 117 | "tools_gsc_mobile_friendly_title": { 118 | "message": "Mobile-Friendly Test" 119 | }, 120 | "tools_gsc_mobile_friendly_description": { 121 | "message": "Test how easily a visitor can use your page on a mobile device." 122 | }, 123 | "tools_gsc_rich_results_title": { 124 | "message": "Rich Results Test" 125 | }, 126 | "tools_gsc_rich_results_description": { 127 | "message": "Test your publicly accessible page to see which rich results can be generated by the structured data it contains." 128 | }, 129 | "tools_gtmetrix_title": { 130 | "message": "GTmetrix | Website Performance Testing and Monitoring" 131 | }, 132 | "tools_gtmetrix_description": { 133 | "message": "GTmetrix is a free tool to test and monitor your page's performance. Using Lighthouse, GTmetrix generates scores for your pages and offers actionable recommendations on how to optimize them." 134 | }, 135 | "tools_nu_html_checker_title": { 136 | "message": "Nu Html Checker" 137 | }, 138 | "tools_nu_html_checker_description": { 139 | "message": "This tool can be used to refine and improve the HTML markup of a website." 140 | }, 141 | "tools_w3c_css_validation_title": { 142 | "message": "W3C CSS Validation Service" 143 | }, 144 | "tools_w3c_css_validation_description": { 145 | "message": "The W3C CSS Validator is free software from the W3C that is designed to help web designers and web developers check their Cascading Style Sheets (CSS)." 146 | }, 147 | "tools_pagespeed_insights_title": { 148 | "message": "PageSpeed Insights" 149 | }, 150 | "tools_pagespeed_insights_description": { 151 | "message": "PageSpeed Insights analyzes the content of a web page, then generates suggestions to make that page faster." 152 | }, 153 | "tools_securityheaders_title": { 154 | "message": "Security Headers" 155 | }, 156 | "tools_securityheaders_description": { 157 | "message": "Security Headers is a tool for determining the HTTP response headers. It also checks whether the most important headers are present." 158 | }, 159 | "tools_ssl_server_test_title": { 160 | "message": "SSL Server Test (Powered by Qualys SSL Labs)" 161 | }, 162 | "tools_ssl_server_test_description": { 163 | "message": "The SSL server test is an online service that enables you to inspect the configuration of any public SSL web server." 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /src/_locales/es/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_description": { 3 | "message": "SEO Insights es una extensión que obtiene información para el análisis y optimización del sitio web." 4 | }, 5 | "summary": { 6 | "message": "Resumen" 7 | }, 8 | "hint": { 9 | "message": "Sugerencia" 10 | }, 11 | "cant_use": { 12 | "message": "SEO Insights no se puede utilizar en esta pestaña." 13 | }, 14 | "headings": { 15 | "message": "Encabezados" 16 | }, 17 | "images": { 18 | "message": "Imágenes" 19 | }, 20 | "images_lc": { 21 | "message": "imágenes" 22 | }, 23 | "icons": { 24 | "message": "Íconos" 25 | }, 26 | "icons_lc": { 27 | "message": "íconos" 28 | }, 29 | "links_lc": { 30 | "message": "enlaces" 31 | }, 32 | "files": { 33 | "message": "Archivos" 34 | }, 35 | "tools": { 36 | "message": "Herramientas" 37 | }, 38 | "errors_warnings_hints": { 39 | "message": "Errores, advertencias y sugerencias" 40 | }, 41 | "others": { 42 | "message": "Otro" 43 | }, 44 | "others_lc": { 45 | "message": "otro" 46 | }, 47 | "words": { 48 | "message": "palabras" 49 | }, 50 | "chars": { 51 | "message": "caracteres" 52 | }, 53 | "emojis": { 54 | "message": "emojis" 55 | }, 56 | "items": { 57 | "message": "elementos" 58 | }, 59 | "all": { 60 | "message": "todos" 61 | }, 62 | "without": { 63 | "message": "no disponible" 64 | }, 65 | "internal": { 66 | "message": "interno" 67 | }, 68 | "external": { 69 | "message": "externo" 70 | }, 71 | "unique": { 72 | "message": "único" 73 | }, 74 | "no_heading_items": { 75 | "message": "Este sitio web no tiene encabezados." 76 | }, 77 | "no_summary_items": { 78 | "message": "Este sitio web no tiene meta para mostrar en el resumen." 79 | }, 80 | "no_file_items": { 81 | "message": "Este sitio web no tiene elementos de archivo." 82 | }, 83 | "no_meta_items": { 84 | "message": "Este sitio web no tiene elementos meta." 85 | }, 86 | "no_items": { 87 | "message": "Este sitio web no tiene $type$.", 88 | "placeholders": { 89 | "type": { 90 | "content": "$1" 91 | } 92 | } 93 | }, 94 | "no_alternate_items": { 95 | "message": "Este sitio web no tiene enlaces alternativos." 96 | }, 97 | "no_domain_items": { 98 | "message": "Este sitio web no tiene $type$ con dominios.", 99 | "placeholders": { 100 | "type": { 101 | "content": "$1" 102 | } 103 | } 104 | }, 105 | "save": { 106 | "message": "Guardar" 107 | }, 108 | "no_preconnect_items": { 109 | "message": "Este sitio web no tiene elementos preconnect." 110 | }, 111 | "no_dns_prefetch_items": { 112 | "message": "Este sitio web no tiene elementos DNS prefetch." 113 | }, 114 | "no_preload_items": { 115 | "message": "Este sitio web no tiene elementos de precargados." 116 | }, 117 | "tools_gsc_mobile_friendly_title": { 118 | "message": "Prueba de compatibilidad con móviles" 119 | }, 120 | "tools_gsc_mobile_friendly_description": { 121 | "message": "Pruebe si su sitio web es accesible para dispositivos móviles." 122 | }, 123 | "tools_gsc_rich_results_title": { 124 | "message": "Prueba de resultados enriquecidos" 125 | }, 126 | "tools_gsc_rich_results_description": { 127 | "message": "Prueba una página a la que pueda acceder todo el mundo para descubrir qué resultados enriquecidos se pueden generar con los datos estructurados que contiene." 128 | }, 129 | "tools_gtmetrix_title": { 130 | "message": "GTmetrix | Pruebas y Monitoreo del Rendimiento del Sitio Web" 131 | }, 132 | "tools_gtmetrix_description": { 133 | "message": "GTmetrix es una herramienta gratuita para probar y monitorear el rendimiento de su página. Utilizando Lighthouse, GTmetrix genera puntuaciones para sus páginas y ofrece recomendaciones prácticas sobre cómo optimizarlas." 134 | }, 135 | "tools_nu_html_checker_title": { 136 | "message": "Nu Html Checker" 137 | }, 138 | "tools_nu_html_checker_description": { 139 | "message": "Esta herramienta se puede utilizar para refinar y mejorar los marcadores HTML de un sitio web." 140 | }, 141 | "tools_w3c_css_validation_title": { 142 | "message": "W3C CSS Validation Service" 143 | }, 144 | "tools_w3c_css_validation_description": { 145 | "message": "El W3C CSS Validator es un software gratuito del W3C que está diseñado para ayudar a los diseñadores y desarrolladores web a verificar sus hojas de estilo en cascada (CSS)." 146 | }, 147 | "tools_pagespeed_insights_title": { 148 | "message": "PageSpeed Insights" 149 | }, 150 | "tools_pagespeed_insights_description": { 151 | "message": "PageSpeed Insights analiza el contenido de una página web y genera sugerencias para mejorar su velocidad de carga." 152 | }, 153 | "tools_securityheaders_title": { 154 | "message": "Security Headers" 155 | }, 156 | "tools_securityheaders_description": { 157 | "message": "Security Headers es una herramienta que determina las respuestas de cabeceras HTTP. También verifica si las cabeceras más importantes están definidas." 158 | }, 159 | "tools_ssl_server_test_title": { 160 | "message": "Prueba del Servidor SSL (Desarrollado por Qualys SSL Labs)" 161 | }, 162 | "tools_ssl_server_test_description": { 163 | "message": "El SSL server test es un servicio en línea que le permite inspeccionar la configuración de cualquier servidor web SSL público." 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /src/content.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SEO Insights 3 | * Copyright (C) 2021 Sebastian Brosch 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | var IsInitializedContent; 20 | 21 | // don't initialize this content script more than once. 22 | if (!IsInitializedContent) { 23 | IsInitializedContent = true; 24 | 25 | // listen to message from the popup script. 26 | // every tab of the extension send a message to this script to get the information. 27 | chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) { 28 | switch (message.info) { 29 | case INFO.SUMMARY: 30 | sendResponse({ 31 | 'meta': SEOInsights.Head.getCommonTags(), 32 | 'ga': { 33 | 'identifiers': SEOInsights.Head.getGoogleAnalytics(), 34 | 'files': SEOInsights.File.getGoogleAnalyticsFiles(), 35 | }, 36 | 'gtm': { 37 | 'identifiers': SEOInsights.Head.getGoogleTagManager(), 38 | 'files': SEOInsights.File.getGoogleTagManagerFiles(), 39 | }, 40 | }); 41 | break; 42 | case INFO.META: 43 | sendResponse({ 44 | 'dublincore': SEOInsights.Meta.getDublineCoreTags(), 45 | 'opengraph': SEOInsights.Meta.getOpenGraphTags(), 46 | 'others': SEOInsights.Head.getOthers(), 47 | 'parsely': SEOInsights.Meta.getParselyTags(), 48 | 'shareaholic': SEOInsights.Meta.getShareaholicTags(), 49 | 'twitter': SEOInsights.Meta.getTwitterTags(), 50 | }); 51 | break; 52 | case INFO.HEADINGS: 53 | sendResponse({ 54 | 'headings': SEOInsights.Heading.getHeadings(), 55 | }); 56 | break; 57 | case INFO.IMAGES: 58 | sendResponse({ 59 | 'images': SEOInsights.Image.getImages(), 60 | 'icons': SEOInsights.Image.getIcons(), 61 | }); 62 | break; 63 | case INFO.LINKS: 64 | sendResponse({ 65 | 'alternate': SEOInsights.Head.getAlternateLinks(), 66 | 'dnsprefetch': SEOInsights.Head.getDnsPrefetch(), 67 | 'links': SEOInsights.Link.getLinks(), 68 | 'preconnect': SEOInsights.Head.getPreconnect(), 69 | 'preload': SEOInsights.Head.getPreload(), 70 | }); 71 | break; 72 | case INFO.FILES: 73 | sendResponse({ 74 | 'javascript': SEOInsights.File.getJavaScriptFiles(), 75 | 'stylesheet': SEOInsights.File.getStylesheetFiles(), 76 | 'googleanalytics': SEOInsights.File.getGoogleAnalyticsFiles(), 77 | 'googletagmanager': SEOInsights.File.getGoogleTagManagerFiles(), 78 | }); 79 | break; 80 | } 81 | }); 82 | } 83 | -------------------------------------------------------------------------------- /src/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SEO-Insights/seo-insights/e63311ab5e2f8288fbc4d430b6c48fcdbe365b96/src/icon128.png -------------------------------------------------------------------------------- /src/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SEO-Insights/seo-insights/e63311ab5e2f8288fbc4d430b6c48fcdbe365b96/src/icon16.png -------------------------------------------------------------------------------- /src/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SEO-Insights/seo-insights/e63311ab5e2f8288fbc4d430b6c48fcdbe365b96/src/icon48.png -------------------------------------------------------------------------------- /src/img/bg-img-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SEO-Insights/seo-insights/e63311ab5e2f8288fbc4d430b6c48fcdbe365b96/src/img/bg-img-pattern.png -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 3, 3 | "name": "SEO Insights", 4 | "version": "0.0.6", 5 | "description": "__MSG_manifest_description__", 6 | "default_locale": "en", 7 | "icons": { 8 | "16": "icon16.png", 9 | "48": "icon48.png", 10 | "128": "icon128.png" 11 | }, 12 | "action": { 13 | "default_icon": "icon16.png", 14 | "default_popup": "popup.html", 15 | "default_title": "SEO Insights" 16 | }, 17 | "permissions": [ 18 | "activeTab", 19 | "scripting" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /src/popup.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 14px; 3 | height: 600px; 4 | max-width: 700px; 5 | min-width: 600px; 6 | } 7 | html, 8 | body { 9 | overflow: hidden scroll; 10 | } 11 | ::-webkit-scrollbar { 12 | background: #eee; 13 | position: absolute; 14 | width: 8px; 15 | } 16 | ::-webkit-scrollbar-thumb { 17 | background: #ddd; 18 | } 19 | div.nav-pills button.nav-link { 20 | border-radius: 0; 21 | } 22 | nav.nav-main { 23 | z-index: 999; 24 | } 25 | nav.nav-main div.nav-pills button.nav-link { 26 | width: 100%; 27 | } 28 | div.container-fluid { 29 | padding: 0; 30 | } 31 | div.container-fluid > nav { 32 | background: #fff; 33 | position: sticky; 34 | top: 0; 35 | } 36 | div.container-fluid div.tab-content { 37 | padding: 0 7px 7px; 38 | } 39 | div.container-fluid div.tab-pane div.tab-content { 40 | padding: 0; 41 | } 42 | div.container-fluid div.tab-pane div.tab-content table td { 43 | font-weight: normal; 44 | } 45 | table[id$="stats"] th, 46 | table[id$="stats"] td { 47 | text-align: center; 48 | } 49 | 50 | /** common table design */ 51 | table.item-list { 52 | border-collapse: separate; 53 | border-spacing: 0 7px; 54 | margin-bottom: 0; 55 | width: 100%; 56 | } 57 | table.item-list tr:not(.empty-alert) td:first-child { 58 | background: #f7f7f7; 59 | border-color: #f0f0f0; 60 | border-width: 1px 0 1px 1px; 61 | font-weight: bolder; 62 | min-width: 135px; 63 | vertical-align: top; 64 | } 65 | table.item-list tr:not(.empty-alert) td:first-child:last-child { 66 | border-width: 1px; 67 | } 68 | table.item-list tr:not(.empty-alert) td:first-child a, 69 | table.item-list tr:not(.empty-alert) td:first-child a:link { 70 | display: block; 71 | font-weight: normal; 72 | word-break: break-all; 73 | } 74 | table.item-list tr:not(.empty-alert) td:nth-child(2) { 75 | background: #f7f7f7; 76 | border-color: #f0f0f0; 77 | border-width: 1px 1px 1px 0; 78 | vertical-align: top; 79 | word-break: break-word; 80 | } 81 | table.item-list tr:not(.empty-alert) td:nth-child(2) ul { 82 | margin: 0; 83 | padding: 0 0 0 20px; 84 | } 85 | table.item-list tr:not(.empty-alert) td:nth-child(2) div.theme-color { 86 | border: 1px solid #a0a0a0; 87 | display: inline-block; 88 | line-height: 18px; 89 | min-width: 100px; 90 | padding: 0 5px; 91 | text-align: center; 92 | } 93 | table.item-list tr:not(.empty-alert) td:nth-child(2) div.theme-color:not(:last-child) { 94 | margin-right: 10px; 95 | } 96 | 97 | /** list of headings */ 98 | table#list-headings tr td { 99 | font-weight: normal; 100 | word-break: break-word; 101 | } 102 | table#list-headings tr[class^="level-"] td span:nth-of-type(1) { 103 | font-weight: bolder; 104 | padding-right: 7px; 105 | } 106 | table#list-headings tr.level-h1 td { 107 | padding-left: 5px; 108 | } 109 | table#list-headings tr.level-h2 td { 110 | padding-left: 15px; 111 | } 112 | table#list-headings tr.level-h3 td { 113 | padding-left: 25px; 114 | } 115 | table#list-headings tr.level-h4 td { 116 | padding-left: 35px; 117 | } 118 | table#list-headings tr.level-h5 td { 119 | padding-left: 45px; 120 | } 121 | table#list-headings tr.level-h6 td { 122 | padding-left: 55px; 123 | } 124 | 125 | /** list of images */ 126 | table#list-images tr span.info { 127 | display: block; 128 | } 129 | 130 | /** image preview */ 131 | div.img-preview img { 132 | background-image: url("img/bg-img-pattern.png"); 133 | border: 2px solid #000; 134 | bottom: 10px; 135 | max-height: 250px; 136 | max-width: 250px; 137 | position: fixed; 138 | right: 18px; 139 | z-index: 999; 140 | } 141 | 142 | /** tools */ 143 | table#info-tools a.full-link { 144 | color: #000; 145 | text-decoration: none; 146 | } 147 | table#info-tools td:hover { 148 | background: #f3f3f3; 149 | } 150 | table#info-tools div.heading { 151 | font-weight: bold; 152 | } 153 | #view-tools { 154 | padding-bottom: 18px; 155 | } 156 | #view-tools .about { 157 | background: #fff; 158 | border-top: 1px solid #777; 159 | bottom: 0; 160 | display: flex; 161 | left: 0; 162 | padding: 0 10px; 163 | position: absolute; 164 | right: 8px; 165 | } 166 | #view-tools .about a { 167 | color: #777; 168 | font-size: 0.8em; 169 | margin: 3px 0; 170 | } 171 | #view-tools .about a:not(:last-child)::after { 172 | content: "|"; 173 | margin: 0 7px; 174 | } 175 | 176 | /** empty alert (hint for tables without content) */ 177 | table tr.empty-alert td { 178 | border: 0; 179 | padding: 0; 180 | } 181 | table tr.empty-alert td div.alert { 182 | font-weight: bold; 183 | } 184 | div.alert.empty-alert { 185 | font-weight: bold; 186 | } 187 | 188 | /** additional information */ 189 | td span.info strong { 190 | margin-right: 4px; 191 | } 192 | td span.info { 193 | color: grey; 194 | display: inline-block; 195 | font-size: 0.9em; 196 | font-style: italic; 197 | font-weight: normal; 198 | word-break: keep-all; 199 | } 200 | td.color-green span.info { 201 | color: #2db83d; 202 | } 203 | td.color-orange span.info { 204 | color: #f39f18; 205 | } 206 | td.color-red span.info { 207 | color: #f00; 208 | } 209 | td span.info:not(:last-child) { 210 | margin-right: 5px; 211 | } 212 | 213 | /** accordion */ 214 | div.accordion-body, 215 | div.accordion-body div.tab-content { 216 | padding: 0; 217 | } 218 | button.accordion-button:focus { 219 | box-shadow: none; 220 | } 221 | button.accordion-button::after { 222 | margin: 0; 223 | } 224 | 225 | /** hint for not supported tabs */ 226 | body.not-supported { 227 | height: 100%; 228 | overflow-y: hidden; 229 | } 230 | body.not-supported div.container-fluid, 231 | body:not(.not-supported) div.alert-not-supported { 232 | display: none; 233 | visibility: hidden; 234 | } 235 | body:not(.not-supported) div.container-fluid, 236 | body.not-supported div.alert-not-supported { 237 | display: block; 238 | visibility: visible; 239 | } 240 | body.not-supported div.alert-not-supported { 241 | border-radius: 0; 242 | margin: 15px; 243 | } 244 | -------------------------------------------------------------------------------- /src/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SEO Insights 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 28 | 29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | 37 | 38 |
39 |
40 | 41 | 42 |
43 |
44 | 45 | 46 |
47 |

48 | 49 |

50 |
51 |
52 | 53 | 54 |
55 |
56 |
57 |
58 | 59 | 60 |
61 |

62 | 63 |

64 |
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 73 | 74 |
75 |

76 | 77 |

78 |
79 |
80 | 81 | 82 |
83 |
84 |
85 |
86 | 87 | 88 |
89 |

90 | 91 |

92 |
93 |
94 | 95 | 96 |
97 |
98 |
99 |
100 | 101 | 102 |
103 |

104 | 105 |

106 |
107 |
108 | 109 | 110 |
111 |
112 |
113 |
114 | 115 | 116 |
117 |

118 | 119 |

120 |
121 |
122 | 123 | 124 |
125 |
126 |
127 |
128 | 129 | 130 |
131 |

132 | 133 |

134 |
135 |
136 | 137 | 138 |
139 |
140 |
141 |
142 | 143 | 144 |
145 |

146 | 147 |

148 |
149 |
150 | 151 | 152 |
153 |
154 |
155 |
156 | 157 | 158 |
159 |

160 | 161 |

162 |
163 |
164 | 165 | 166 |
167 |
168 |
169 |
170 | 171 | 172 |
173 |

174 | 175 |

176 |
177 |
178 | 179 | 180 |
181 |
182 |
183 |
184 | 185 | 186 |
187 |

188 | 189 |

190 |
191 |
192 | 193 | 194 |
195 |
196 |
197 |
198 | 199 | 200 |
201 |

202 | 203 |

204 |
205 |
206 | 207 | 208 |
209 |
210 |
211 |
212 | 213 | 214 |
215 |

216 | 217 |

218 |
219 |
220 | 221 | 222 |
223 |
224 |
225 |
226 |
227 |
228 | 229 | 230 | 231 | 232 |
233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 |
h1h2h3h4h5h6total
259 | 260 | 261 | 262 | 263 |
264 | 265 | 266 |
267 |
268 |

269 | 270 |

271 |
272 |
273 | 274 | 275 |
276 |
277 |
278 |
279 |
280 |
281 | 282 | 283 | 284 | 285 |
286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 |
__MSG_all____MSG_without__ alt__MSG_without__ src__MSG_without__ title
306 | 307 | 314 |
315 | 320 | 325 | 330 |
331 |
332 | 333 | 334 | 335 | 336 | 451 | 452 | 453 | 454 | 455 |
456 |
457 |
458 |

459 | 460 |

461 |
462 |
463 | 469 |
470 |
471 | 472 | 473 |
474 |
475 |
476 | 477 | 478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |

486 | 487 |

488 |
489 |
490 | 496 |
497 |
498 | 499 | 500 |
501 |
502 |
503 | 504 | 505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |

513 | 514 |

515 |
516 |
517 | 518 | 519 |
520 |
521 |
522 |
523 |
524 |
525 | 526 | 527 | 528 | 529 |
530 | 531 | 532 |
533 |
534 | 535 | 536 | 537 | 538 |
539 | 540 | 541 |
542 | 548 |
549 |
550 |
551 | 552 | 553 | -------------------------------------------------------------------------------- /src/scripts/files.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SEO Insights 3 | * Copyright (C) 2021 Sebastian Brosch 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | // create the namespace of SEO Insights if the namespace doesn't exist. 20 | var SEOInsights = (SEOInsights || {}); 21 | 22 | /** 23 | * The File class of SEO Insights to get information of files used on a website. 24 | */ 25 | SEOInsights.File = class File { 26 | 27 | /** 28 | * Checks whether a url is a Google Analytics url. 29 | * @param {URL} url The url to check for Google Analytics url. 30 | * @returns {boolean} State whether the url is a Google Analytics url. 31 | */ 32 | static isGoogleAnalyticsUrl(url) { 33 | 34 | /** 35 | * How to detect Google Analytics files? 36 | * 37 | * The detection of Google Analytics files works only with the URL of the included file. 38 | * The differentiation between the different Google Analytics variants is made via the 39 | * hostname, pathname and by a possibly existing ID. 40 | * 41 | * Google Analytics using analytics.js: 42 | * - Hostname: www.google-analytics.com 43 | * - Pathname: analytics.js 44 | * 45 | * Google Analytics using ga.js: 46 | * - Hostname: ssl.google-analytics.com or www.google-analytics.com 47 | * - Pathname: ga.js 48 | * 49 | * Google Analytics using Universal Analytics: 50 | * - Hostname: www.googletagmanager.com 51 | * - Pathname: /gtag/js 52 | * - There is also a Google Analytics Tracking ID (e.g. UA-XXXXX-XXXXX) 53 | * 54 | * Google Analytics using Google Analytics 4: 55 | * - Hostname: www.googletagmanager.com 56 | * - Pathname: /gtag/js 57 | * - There is also a Google Analytics 4 Tracking-ID (e.g. G-XXXXXX) 58 | */ 59 | return ( 60 | (url.hostname === 'www.google-analytics.com' && url.pathname.toLowerCase().endsWith('analytics.js')) 61 | || (['www.google-analytics.com', 'ssl.google-analytics.com'].includes(url.hostname) && url.pathname.toLowerCase().endsWith('ga.js')) 62 | || (url.hostname === 'www.googletagmanager.com' && url.pathname.toLowerCase().endsWith('/gtag/js') && (/UA(-\d+){2}/.test(url.search) || /G-[A-Z0-9]/.test(url.search))) 63 | ); 64 | } 65 | 66 | /** 67 | * Checks whether a url is a Google Tag Manager url. 68 | * @param {URL} url The url to check for Google Tag Manager url. 69 | * @returns {boolean} State whether the url is a Google Tag Manager url. 70 | */ 71 | static isGoogleTagManagerUrl(url) { 72 | 73 | /** 74 | * How to detect Google Tag Manager files? 75 | * 76 | * The detection of Google Tag Manager files works only with the URL of the included file. 77 | * The differentiation between the different Google Analytics variants is made via the 78 | * hostname, pathname and by a possibly existing ID. 79 | */ 80 | return ( 81 | url.hostname === 'www.googletagmanager.com' && url.pathname.toLowerCase().endsWith('/gtm.js') && /GTM-[0-9A-Z]{4,}/.test(url.search) 82 | ); 83 | } 84 | 85 | /** 86 | * Returns all Google Analytics files of the website. 87 | * @returns {Array} An array with all found Google Analytics files of the website. 88 | */ 89 | static getGoogleAnalyticsFiles() { 90 | const files = []; 91 | 92 | // get all Google Analytics files of the website. 93 | $('script[src]').filter(function() { 94 | const url = new URL(($(this).attr('src') || '').toString().trim(), getBaseUrl()); 95 | return SEOInsights.File.isGoogleAnalyticsUrl(url); 96 | }).each(function() { 97 | const url = new URL(($(this).attr('src') || '').toString().trim(), getBaseUrl()); 98 | 99 | // add the url of the file to the file array. 100 | files.push({ 101 | original: ($(this).attr('src') || '').toString().trim(), 102 | async: $(this).attr('async') ? true : false, 103 | charset: ($(this).attr('charset') || '').toString().trim(), 104 | url: { 105 | href: url.href, 106 | origin: url.origin, 107 | }, 108 | }); 109 | }); 110 | 111 | // return all the found files. 112 | return files; 113 | } 114 | 115 | /** 116 | * Returns all Google Tag Manager files of the website. 117 | * @returns {Array} An array with all found Google Tag Manager files of the website. 118 | */ 119 | static getGoogleTagManagerFiles() { 120 | const files = []; 121 | 122 | // get all Google Tag Manager files of the website. 123 | $('script[src]').filter(function() { 124 | const url = new URL(($(this).attr('src') || '').toString().trim(), getBaseUrl()); 125 | return SEOInsights.File.isGoogleTagManagerUrl(url); 126 | }).each(function() { 127 | const url = new URL(($(this).attr('src') || '').toString().trim(), getBaseUrl()); 128 | 129 | // add the url of the file to the file array. 130 | files.push({ 131 | original: ($(this).attr('src') || '').toString().trim(), 132 | async: $(this).attr('async') ? true : false, 133 | charset: ($(this).attr('charset') || '').toString().trim(), 134 | url: { 135 | href: url.href, 136 | origin: url.origin, 137 | }, 138 | }); 139 | }); 140 | 141 | // return all the found files. 142 | return files; 143 | } 144 | 145 | /** 146 | * Returns all JavaScript files of the website. 147 | * @returns {Array} An array with all found JavaScript files of the website. 148 | */ 149 | static getJavaScriptFiles() { 150 | const files = []; 151 | 152 | // get all JavaScript files of the website. 153 | $('script[src]').filter(function() { 154 | return (($(this).attr('src') || '').toString().trim() !== ''); 155 | }).each(function() { 156 | const url = new URL(($(this).attr('src') || '').toString().trim(), getBaseUrl()); 157 | 158 | // add the url of the file to the file array. 159 | files.push({ 160 | original: ($(this).attr('src') || '').toString().trim(), 161 | async: $(this).attr('async') ? true : false, 162 | charset: ($(this).attr('charset') || '').toString().trim(), 163 | url: { 164 | href: url.href, 165 | origin: url.origin, 166 | }, 167 | }); 168 | }); 169 | 170 | // return all the found files. 171 | return files; 172 | } 173 | 174 | /** 175 | * Returns all Stylesheet files of the website. 176 | * @returns {Array} An array with all found Stylesheet files of the website. 177 | */ 178 | static getStylesheetFiles() { 179 | const files = []; 180 | 181 | // get all Stylesheet files of the website. 182 | $('link[rel="stylesheet"]').filter(function() { 183 | return (($(this).attr('href') || '').toString().trim() !== ''); 184 | }).each(function() { 185 | const url = new URL(($(this).attr('href') || '').toString().trim(), getBaseUrl()); 186 | 187 | // add the url of the file to the file array. 188 | files.push({ 189 | original: ($(this).attr('href') || '').toString().trim(), 190 | media: ($(this).attr('media') || '').toString().trim(), 191 | url: { 192 | href: url.href, 193 | origin: url.origin, 194 | }, 195 | }); 196 | }); 197 | 198 | // return all the found files. 199 | return files; 200 | } 201 | }; 202 | -------------------------------------------------------------------------------- /src/scripts/head.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SEO Insights 3 | * Copyright (C) 2021 Sebastian Brosch 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | // create the namespace of SEO Insights if the namespace doesn't exist. 20 | var SEOInsights = (SEOInsights || {}); 21 | 22 | /** 23 | * The Head class of SEO Insights to get information from the of the website. 24 | */ 25 | SEOInsights.Head = class Head { 26 | 27 | /** 28 | * Returns all common names to get from . 29 | * @returns {Array} The common names to get from . 30 | */ 31 | static getArrayCommonNames() { 32 | return [ 33 | 'application-name', 34 | 'author', 35 | 'bingbot', 36 | 'description', 37 | 'generator', 38 | 'google', 39 | 'googlebot', 40 | 'google-site-verification', 41 | 'keywords', 42 | 'msnbot', 43 | 'rating', 44 | 'referrer', 45 | 'robots', 46 | 'theme-color', 47 | 'viewport', 48 | ]; 49 | } 50 | 51 | /** 52 | * Returns all common tags to get from . 53 | * @returns {Array} The common tags to get from . 54 | */ 55 | static getArrayCommonTags() { 56 | return [ 57 | 'title', 58 | ]; 59 | } 60 | 61 | /** 62 | * Returns the canonical url of the website, defined on the . 63 | * @returns {string} The canonical url of the website. 64 | */ 65 | static getCanonical() { 66 | return ($('head > link[rel="canonical"]').attr('href') || '').toString().trim(); 67 | } 68 | 69 | /** 70 | * Returns the preconnect information of the website. 71 | * @returns {Array} The found preconnect information of the website. 72 | */ 73 | static getPreconnect() { 74 | const tags = []; 75 | 76 | // iterate through the preconnect information. 77 | $('head > link[rel="preconnect"]').each(function() { 78 | tags.push({ 79 | href: ($(this).attr('href') || '').toString().trim(), 80 | }); 81 | }); 82 | 83 | // return the found preconnect information. 84 | return tags; 85 | } 86 | 87 | /** 88 | * Returns the DNS prefetch information of the website. 89 | * @returns {Array} The found DNS prefetch information of the website. 90 | */ 91 | static getDnsPrefetch() { 92 | const tags = []; 93 | 94 | // iterate through the DNS prefetch information of the website. 95 | $('head > link[rel="dns-prefetch"]').each(function() { 96 | tags.push({ 97 | href: ($(this).attr('href') || '').toString().trim(), 98 | }); 99 | }); 100 | 101 | // return the found DNS prefetch information. 102 | return tags; 103 | } 104 | 105 | /** 106 | * Returns the alternate links of the website. 107 | * @returns {Array} The found alternate links of the website. 108 | */ 109 | static getAlternateLinks() { 110 | const tags = []; 111 | 112 | // iterate through the alternate links of the website. 113 | $('head > link[rel="alternate"]').each(function() { 114 | tags.push({ 115 | title: ($(this).attr('title') || '').toString().trim(), 116 | href: ($(this).attr('href') || '').toString().trim(), 117 | hreflang: ($(this).attr('hreflang') || '').toString().trim(), 118 | }); 119 | }); 120 | 121 | // return the found alternate links of the website. 122 | return tags; 123 | } 124 | 125 | /** 126 | * Returns the preload information of the website. 127 | * @returns {Array} The found preload information of the website. 128 | */ 129 | static getPreload() { 130 | const tags = []; 131 | 132 | // iterate through the preload information of the website. 133 | $('head > link[rel="preload"]').each(function() { 134 | tags.push({ 135 | href: ($(this).attr('href') || '').toString().trim(), 136 | as: ($(this).attr('as') || '').toString().trim(), 137 | type: ($(this).attr('type') || '').toString().trim(), 138 | }); 139 | }); 140 | 141 | // return the found preload information. 142 | return tags; 143 | } 144 | 145 | /** 146 | * Returns the common information of the website. 147 | * @returns {Array} The found common information of the website. 148 | */ 149 | static getCommonTags() { 150 | const tags = []; 151 | 152 | // iterate through the elements of the website to get the elements with common names. 153 | $('head > meta[name]').filter(function() { 154 | return SEOInsights.Head.getArrayCommonNames().includes(($(this).attr('name') || '').toString().trim().toLowerCase()); 155 | }).each(function() { 156 | tags.push({ 157 | name: ($(this).attr('name') || '').toString().trim().toLowerCase(), 158 | value: ($(this).attr('content') || '').toString().trim(), 159 | }); 160 | }); 161 | 162 | // get the language information of the website. 163 | $('html[lang]').each(function() { 164 | tags.push({ 165 | name: 'lang', 166 | value: ($(this).attr('lang') || '').toString().trim(), 167 | }); 168 | }); 169 | 170 | // iterate through the common tags of the website. 171 | for (const tagCommon of SEOInsights.Head.getArrayCommonTags()) { 172 | const itemTagCommon = $(`head > ${tagCommon}`).first(); 173 | 174 | // add the tag information to the array if available. 175 | if (itemTagCommon) { 176 | tags.push({ 177 | name: tagCommon, 178 | value: (itemTagCommon.text() || '').toString().trim(), 179 | }); 180 | } 181 | } 182 | 183 | // get the canonical url of the website. 184 | const canonical = SEOInsights.Head.getCanonical(); 185 | 186 | // add the canonical link to the tag array if available. 187 | if (canonical !== '') { 188 | tags.push({ 189 | name: 'canonical', 190 | value: decodeURI((new URL(canonical, getBaseUrl())).href), 191 | }); 192 | } 193 | 194 | // return the found common information. 195 | return tags; 196 | } 197 | 198 | /** 199 | * Returns the identifiers of the Google Tag Manager found on the website. 200 | * @returns {Array} The identifiers of the Google Tag Manager found on the website. 201 | */ 202 | static getGoogleTagManager() { 203 | const identifier = []; 204 | 205 | // set the regular expressions to get the identifiers of the Google Tag Manager. 206 | // there are two regular expressions to get the identifiers of the Google Tag Manager with and without quotes. 207 | // these regular expressions are defined without modifiers. the modifiers are set on usage if needed. 208 | const regexQuotedGTM = /(?<=['"])GTM-[0-9A-Z]{4,}(?=['"])/; 209 | const regexUnquotedGTM = /GTM-[0-9A-Z]{4,}/; 210 | 211 | // get all files of Google Tag Manager to find identifiers. 212 | const files = SEOInsights.File.getGoogleTagManagerFiles(); 213 | 214 | // iterate through all the files to get the identifiers. 215 | for (const file of files) { 216 | 217 | // get the identifiers of the Google Tag Manager file url. 218 | const matches = file.original.match(new RegExp(regexUnquotedGTM, 'g')); 219 | 220 | // set the found identifiers of the file url to the array. 221 | for (const id of (matches || []).filter(item => item !== null)) { 222 | identifier.push({ 223 | id: id, 224 | source: 'url', 225 | }); 226 | } 227 | } 228 | 229 | // get the scripts of the website containing a Google Tag Manager identifier. 230 | $("script:not([src])").filter(function() { 231 | return regexQuotedGTM.test($(this).text()); 232 | }).each(function() { 233 | 234 | // get the Google Tag Manager identifier of the current script. 235 | const matches = ($(this).text() || '').toString().match(new RegExp(regexQuotedGTM, 'g')); 236 | 237 | // set the found identifiers of the script to the array. 238 | for (const id of (matches || []).filter(item => item !== null)) { 239 | identifier.push({ 240 | id: id, 241 | source: 'script', 242 | }); 243 | } 244 | }); 245 | 246 | // return the found identifiers of the Google Tag Manager. 247 | return identifier; 248 | } 249 | 250 | /** 251 | * Returns the identifiers of Google Analytics found on the website. 252 | * @returns {Array} The identifiers of Google Analytics found on the website. 253 | */ 254 | static getGoogleAnalytics() { 255 | const identifier = []; 256 | 257 | // set the regular expressions to get the identifiers of Google Analytics. 258 | // there are two regular expressions to get the identifiers of Google Analytics with and without quotes. 259 | // these regular expressions are defined without modifiers. the modifiers are set on usage if needed. 260 | const regexUnqoutedUA = /UA(-\d+){2}/; 261 | const regexUnqoutedG = /G-[A-Z0-9]+/; 262 | const regexQuotedGTAG = /(?<=['"]config['"],[ ]*['"])UA(-\d+){2}(?=['"])/; 263 | const regexQuotedAnalytics = /(?<=['"]create['"],[ ]*['"])UA(-\d+){2}(?=['"])/; 264 | const regexQuotedGA = /(?<=['"]_setAccount['"],[ ]*['"])UA(-\d+){2}(?=['"])/; 265 | const regexQuotedGA4 = /(?<=['"]config['"],[ ]*['"])G-[0-9A-Z]+(?=['"])/; 266 | 267 | // get the files of Google Analytics to find identifiers. 268 | const files = SEOInsights.File.getGoogleAnalyticsFiles(); 269 | 270 | // iterate through the Google Analytics files to get the identifiers. 271 | for (const file of files) { 272 | let matches = []; 273 | 274 | // get the identifiers of Google Analytics file url. 275 | matches = matches.concat(file.original.match(new RegExp(regexUnqoutedUA, 'g'))); 276 | matches = matches.concat(file.original.match(new RegExp(regexUnqoutedG, 'g'))); 277 | 278 | // set the identifiers to the array. 279 | for (const id of (matches || []).filter(item => item !== null)) { 280 | identifier.push({ 281 | id: id, 282 | source: 'url', 283 | }); 284 | } 285 | } 286 | 287 | // get the scripts of the website containing Google Analytics identifier. 288 | $("script:not([src])").filter(function() { 289 | const script = $(this).text(); 290 | return regexQuotedGTAG.test(script) || regexQuotedAnalytics.test(script) || regexQuotedGA.test(script) || regexQuotedGA4.test(script); 291 | }).each(function() { 292 | let matches = []; 293 | 294 | // get the identifiers from scripts using the regular expressions. 295 | matches = matches.concat(($(this).text() || '').toString().match(new RegExp(regexQuotedGTAG, 'g'))); 296 | matches = matches.concat(($(this).text() || '').toString().match(new RegExp(regexQuotedAnalytics, 'g'))); 297 | matches = matches.concat(($(this).text() || '').toString().match(new RegExp(regexQuotedGA, 'g'))); 298 | matches = matches.concat(($(this).text() || '').toString().match(new RegExp(regexQuotedGA4, 'g'))); 299 | 300 | // set the found identifiers to the array. 301 | for (const id of (matches || []).filter(item => item !== null)) { 302 | identifier.push({ 303 | id: id, 304 | source: 'script', 305 | }); 306 | } 307 | }); 308 | 309 | // return the found identifiers of Google Analytics. 310 | return identifier; 311 | } 312 | 313 | /** 314 | * Returns the information not found with other methods / functions of SEO Insights. 315 | * @returns {Array} The information not found with other methods / functions of SEO Insights. 316 | */ 317 | static getOthers() { 318 | const tags = []; 319 | 320 | // get the meta information from meta elements with name property. 321 | $('head > meta[name]').filter(function() { 322 | const name = ($(this).attr('name') || '').toString().trim(); 323 | return !SEOInsights.Meta.isDublinCoreTag(name) && 324 | !SEOInsights.Meta.isTwitterTag(name) && 325 | !SEOInsights.Meta.isParselyTag(name) && 326 | !SEOInsights.Meta.isShareaholicTag(name) && 327 | !SEOInsights.Meta.isOpenGraphTag(name) && 328 | !SEOInsights.Head.getArrayCommonNames().includes(name); 329 | }).each(function() { 330 | const name = ($(this).attr('name') || '').toString().trim(); 331 | 332 | // set the meta information to the array. 333 | tags.push({ 334 | name: name, 335 | value: ($(this).attr('content') || '').toString().trim(), 336 | }); 337 | }); 338 | 339 | // get the meta information from meta elements with property property. 340 | $('head > meta[property]').filter(function() { 341 | const property = ($(this).attr('property') || '').toString().trim(); 342 | return !SEOInsights.Meta.isDublinCoreTag(property) && 343 | !SEOInsights.Meta.isTwitterTag(property) && 344 | !SEOInsights.Meta.isParselyTag(property) && 345 | !SEOInsights.Meta.isOpenGraphTag(property); 346 | }).each(function() { 347 | const property = ($(this).attr('property') || '').toString().trim(); 348 | 349 | // set the meta information to the array. 350 | tags.push({ 351 | name: property, 352 | value: ($(this).attr('content') || '').toString().trim(), 353 | }); 354 | }); 355 | 356 | // iterate through the HTTP equivalent information of the website. 357 | $('head > meta[http-equiv]').each(function() { 358 | tags.push({ 359 | name: ($(this).attr('http-equiv') || '').toString().trim(), 360 | value: ($(this).attr('content') || '').toString().trim(), 361 | }); 362 | }); 363 | 364 | // iterate through the charset information of the website. 365 | $('head > meta[charset]').each(function() { 366 | tags.push({ 367 | name: 'charset', 368 | value: ($(this).attr('charset') || '').toString().trim(), 369 | }); 370 | }); 371 | 372 | // return the found meta information not found with other methods / functions of SEO Insights. 373 | return tags; 374 | } 375 | }; 376 | -------------------------------------------------------------------------------- /src/scripts/heading.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SEO Insights 3 | * Copyright (C) 2021 Sebastian Brosch 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | // create the namespace of SEO Insights if the namespace doesn't exist. 20 | var SEOInsights = (SEOInsights || {}); 21 | 22 | /** 23 | * The Heading class of SEO Insights to get information of headings used on a website. 24 | */ 25 | SEOInsights.Heading = class Heading { 26 | 27 | /** 28 | * Returns all headings of the specified context. 29 | * @param {object} context The specified context to get all the headings. 30 | * @returns {Array} An array with all found headings of the specified context. 31 | */ 32 | static getHeadingsOfDocument(context = null) { 33 | const headings = []; 34 | 35 | // iterate through all headings of the specified context. 36 | // add all the headings of the specified context. 37 | $('h1, h2, h3, h4, h5, h6', context).each(function() { 38 | headings.push({ 39 | text: ($(this).text() || '').toString().trim(), 40 | type: ($(this).prop('tagName') || '').toString().trim().toLowerCase(), 41 | }); 42 | }); 43 | 44 | // return all the found headings. 45 | return headings; 46 | } 47 | 48 | /** 49 | * Returns all headings of the current website. 50 | * @returns {Array} An array with all found headings of the website. 51 | */ 52 | static getHeadings() { 53 | let headings = SEOInsights.Heading.getHeadingsOfDocument(); 54 | 55 | // iterate through the frames of the page to get the headings of the available frames. 56 | // there are also blocked frames so we have to try to get the document of the frame. 57 | for (let frameIndex = 0; frameIndex < window.frames.length; frameIndex++) { 58 | try { 59 | headings = headings.concat(SEOInsights.Heading.getHeadingsOfDocument(window.frames[frameIndex].document)); 60 | } catch(_e) {} 61 | } 62 | 63 | // return all the found headings of the website. 64 | return headings; 65 | } 66 | }; 67 | -------------------------------------------------------------------------------- /src/scripts/helper.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SEO Insights 3 | * Copyright (C) 2021 Sebastian Brosch 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /* exported INFO */ 20 | /* exported getBaseUrl */ 21 | /* exported getName */ 22 | /* exported translateTextContent */ 23 | 24 | /* 25 | * The enum for the different information areas of this chrome extension. 26 | */ 27 | var INFO = { 28 | FILES: 'file', 29 | HEADER: 'header', 30 | HEADINGS: 'heading', 31 | IMAGES: 'images', 32 | LINKS: 'links', 33 | META: 'meta', 34 | SUMMARY: 'summary', 35 | }; 36 | 37 | /** 38 | * Returns the base url of the website. It also considers the base url on meta information. 39 | * @returns {string} The base url of the website. 40 | */ 41 | function getBaseUrl() { 42 | const baseUrl = $('head > base').first().attr('href'); 43 | 44 | // use the base url of the meta information if available. 45 | if (baseUrl) { 46 | return (new URL(baseUrl, (location.origin + location.pathname))).href; 47 | } else { 48 | return (new URL(location.origin + location.pathname)).href; 49 | } 50 | } 51 | 52 | /** 53 | * Returns the value of the name or property attribute of a given HTML element. 54 | * @param {object} html The HTML to get the value of name or property attribute. 55 | * @returns {string} The value of the name or property attribute of the given HTML element. 56 | */ 57 | function getName(html) { 58 | if ($(html).is('[property]')) { 59 | return $(html).attr('property').trim().toLowerCase(); 60 | } else if ($(html).is('[name]')) { 61 | return $(html).attr('name').trim().toLowerCase(); 62 | } else { 63 | return null; 64 | } 65 | } 66 | 67 | /** 68 | * Replace all placeholder for translation with translated value. 69 | */ 70 | function translateTextContent() { 71 | $("body").find("*").contents().each(function() { 72 | if (this.nodeType === 3) { 73 | this.textContent = this.textContent.replace(/__MSG_(\w+)__/g, function(match, word) { 74 | return word ? chrome.i18n.getMessage(word) : ''; 75 | }); 76 | } 77 | }); 78 | $("body").find('a[href*="__MSG_"]').each(function() { 79 | this.href = this.href.replace(/__MSG_(@@\w+)__/g, function(match, word) { 80 | return word ? chrome.i18n.getMessage(word) : ''; 81 | }); 82 | }); 83 | } 84 | -------------------------------------------------------------------------------- /src/scripts/image.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SEO Insights 3 | * Copyright (C) 2021 Sebastian Brosch 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | // create the namespace of SEO Insights if the namespace doesn't exist. 20 | var SEOInsights = (SEOInsights || {}); 21 | 22 | /** 23 | * The Image class of SEO Insights to get information of images used on a website. 24 | */ 25 | SEOInsights.Image = class Image { 26 | 27 | /** 28 | * Returns detailed information (source and filename) of the image source. 29 | * @param {string} src The source of the image to get detailed information. 30 | * @returns {object} An object with the source and the filename (if available). 31 | */ 32 | static getImageSource(src) { 33 | 34 | // if there is no image source or a data source the value can be returned. 35 | // there is no possibility to get a url object with advanced information. 36 | if (src.trim() === '' || src.startsWith('data:')) { 37 | return { 38 | filename: '', 39 | source: src, 40 | }; 41 | } 42 | 43 | // try to get a url object with advanced information. 44 | try { 45 | 46 | // get the image source as url object to get the advanced information. 47 | // if there is no protocol, the current protocol of the website is used (relative protocol). 48 | const srcUrl = new URL(src, getBaseUrl()); 49 | 50 | // ignore images of other extensions. chrome and edge use the same protocol. 51 | if (srcUrl.protocol === 'chrome-extension:') { 52 | return null; 53 | } 54 | 55 | // return the image url and filename of the image source. 56 | return { 57 | filename: srcUrl.href.substring(srcUrl, srcUrl.href.lastIndexOf('/') + 1), 58 | source: srcUrl.href, 59 | }; 60 | } catch(_e) { 61 | return null; 62 | } 63 | } 64 | 65 | /** 66 | * Returns all images of the specified context. 67 | * @param {object} context The specified context to get all the images. 68 | * @returns {Array} An array with all found images of the specified context. 69 | */ 70 | static getImagesOfDocument(context = null) { 71 | const images = []; 72 | 73 | // get all and element of the current context. 74 | $('picture, img', context).each(function() { 75 | const elementTagName = ($(this).prop('tagName') || '').toString().toLowerCase(); 76 | 77 | // get the image information depending on the element. 78 | // it is possible to get some more information from element. 79 | if (elementTagName === 'picture') { 80 | const pictures = []; 81 | 82 | // get the sources and different images and sizes. 83 | $('source', $(this)).each(function() { 84 | const srcset = ($(this).attr('srcset') || '').toString().trim(); 85 | const sources = srcset.split(/(?<=\d+w)[,]/); 86 | 87 | // iterate through the sources. 88 | for (const source of sources) { 89 | pictures.push({ 90 | 'src': SEOInsights.Image.getImageSource(source.split(/[ ](?=\d+w)/)[0]), 91 | 'size': (source.split(/[ ](?=\d+w)/)[1] || '').toString().trim(), 92 | }); 93 | } 94 | }); 95 | 96 | // get the element inside the element. 97 | $('img', $(this)).filter(function() { 98 | return (SEOInsights.Image.getImageSource(($(this).attr('src') || '').toString().trim()) !== null); 99 | }).each(function() { 100 | const source = SEOInsights.Image.getImageSource(($(this).attr('src') || '').toString().trim()); 101 | 102 | // add the current image to the array. 103 | images.push({ 104 | alt: ($(this).attr('alt') || '').toString().trim(), 105 | filename: source.filename, 106 | src: ($(this).attr('src') || '').toString().trim(), 107 | source: source.source, 108 | title: ($(this).attr('title') || '').toString().trim(), 109 | pictures: pictures, 110 | }); 111 | }); 112 | } else if (elementTagName === 'img') { 113 | const source = SEOInsights.Image.getImageSource(($(this).attr('src') || '').toString().trim()); 114 | 115 | // ignore images without a source. 116 | if (source === null) { 117 | return; 118 | } 119 | 120 | // ignore all the elements inside a element. 121 | if (($(this).parent().prop('tagName') || '').toString().toLowerCase() === 'picture') { 122 | return; 123 | } 124 | 125 | // add the current image to the array. 126 | images.push({ 127 | alt: ($(this).attr('alt') || '').toString().trim(), 128 | filename: source.filename, 129 | src: ($(this).attr('src') || '').toString().trim(), 130 | source: source.source, 131 | title: ($(this).attr('title') || '').toString().trim(), 132 | }); 133 | } 134 | }); 135 | 136 | // return all found images. 137 | return images; 138 | } 139 | 140 | /** 141 | * Returns all images of the current website. 142 | * @returns {Array} An array with all found images of the website. 143 | */ 144 | static getImages() { 145 | let images = SEOInsights.Image.getImagesOfDocument(); 146 | 147 | // iterate through the frames of the page to get the images of the available frames. 148 | for (let frameIndex = 0; frameIndex < window.frames.length; frameIndex++) { 149 | 150 | // there are also blocked frames so we have to try to get the document of the frame. 151 | try { 152 | images = images.concat(SEOInsights.Image.getImagesOfDocument(window.frames[frameIndex].document)); 153 | } catch(_e) {} 154 | } 155 | 156 | // return all found images of the website. 157 | return images; 158 | } 159 | 160 | /** 161 | * Returns all icons of the current website. 162 | * @returns {Array} An array with all found icons of the website. 163 | */ 164 | static getIcons() { 165 | const icons = []; 166 | 167 | // iterate through all icons of the website header. 168 | $('head > link[rel*="icon"]').filter(function() { 169 | return (SEOInsights.Image.getImageSource(($(this).attr('href') || '').toString().trim()) !== null); 170 | }).each(function() { 171 | const source = SEOInsights.Image.getImageSource(($(this).attr('href') || '').toString().trim()); 172 | 173 | // add the icon to the array. 174 | icons.push({ 175 | href: ($(this).attr('href') || '').toString().trim(), 176 | filename: source.filename, 177 | sizes: ($(this).attr('sizes') || '').toString().trim(), 178 | source: source.source, 179 | type: ($(this).attr('type') || '').toString().trim(), 180 | }); 181 | }); 182 | 183 | // return all found icons of the website. 184 | return icons; 185 | } 186 | }; 187 | -------------------------------------------------------------------------------- /src/scripts/link.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SEO Insights 3 | * Copyright (C) 2021 Sebastian Brosch 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | // create the namespace of SEO Insights if the namespace doesn't exist. 20 | var SEOInsights = (SEOInsights || {}); 21 | 22 | /** 23 | * The Link class of SEO Insights to get information of links used on a website. 24 | */ 25 | SEOInsights.Link = class Link { 26 | 27 | /** 28 | * Returns all links of the specified context. 29 | * @param {object} context The specified context to get all the links. 30 | * @returns {Array} An array with all found links of the specified context. 31 | */ 32 | static getLinksOfDocument(context = null) { 33 | const links = []; 34 | 35 | // iterate through all links of the specified context. 36 | // add all the links of the specified context (also links without target). 37 | $('a', context).each(function() { 38 | const href = ($(this).attr('href') || '').toString().trim(); 39 | 40 | // set all the basic information into the link object. 41 | // the basic information is located at the link element directly. 42 | const link = { 43 | href: href, 44 | rel: ($(this).attr('rel') || '').toString().trim(), 45 | target: ($(this).attr('target') || '').toString().trim(), 46 | title: ($(this).attr('title') || '').toString().trim(), 47 | }; 48 | 49 | // set the url information to the link object if a target is available. 50 | if (href !== '') { 51 | try { 52 | 53 | // get the url object of the current link. 54 | // this can also be used to make sure the link is a valid url. 55 | const url = new URL(href, getBaseUrl()); 56 | 57 | // ignore the current link if it is a link of an extension. 58 | // an extension can also set elements to the website. 59 | if (url.protocol === 'chrome-extension:') { 60 | return; 61 | } 62 | 63 | // set the information of the url object to the link information. 64 | link.url = { 65 | hash: (url.hash || '').toString().trim(), 66 | href: (url.href || '').toString().trim(), 67 | origin: (url.origin || '').toString().trim(), 68 | path: (url.pathname || '').toString().trim(), 69 | protocol: (url.protocol || '').toString().trim().replace(':', ''), 70 | }; 71 | } catch(_e) {} 72 | } 73 | 74 | // add the link information to the array. 75 | links.push(link); 76 | }); 77 | 78 | // return all the found links. 79 | return links; 80 | } 81 | 82 | /** 83 | * Returns all links of the current website. 84 | * @returns {Array} An array with all found links of the website. 85 | */ 86 | static getLinks() { 87 | let links = SEOInsights.Link.getLinksOfDocument(); 88 | 89 | // iterate through the frames of the page to get the links of the available frames. 90 | // there are also blocked frames so we have to try to get the document of the frame. 91 | for (let frameIndex = 0; frameIndex < window.frames.length; frameIndex++) { 92 | try { 93 | links = links.concat(SEOInsights.Link.getLinksOfDocument(window.frames[frameIndex].document)); 94 | } catch(_e) {} 95 | } 96 | 97 | // return all the found links of the website. 98 | return links; 99 | } 100 | }; 101 | -------------------------------------------------------------------------------- /src/scripts/meta.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SEO Insights 3 | * Copyright (C) 2021 Sebastian Brosch 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | // create the namespace of SEO Insights if the namespace doesn't exist. 20 | var SEOInsights = (SEOInsights || {}); 21 | 22 | /** 23 | * The Meta class of SEO Insights to get information of Meta used on a website. 24 | */ 25 | SEOInsights.Meta = class Meta { 26 | 27 | /** 28 | * Returns a object with information of Open Graph tags. 29 | * @returns {object} An object with information of Open Graph tags. 30 | * @see https://ogp.me/ 31 | */ 32 | static tagsOpenGraph() { 33 | return { 34 | article: [ 35 | { name: 'article:author', description: 'Writers of the article.' }, 36 | { name: 'article:expiration_time', description: 'When the article is out of date after.' }, 37 | { name: 'article:modified_time', description: 'When the article was last changed.' }, 38 | { name: 'article:publisher', description: '' }, 39 | { name: 'article:published_time', description: 'When the article was first published.' }, 40 | { name: 'article:section', description: 'A high-level section name.' }, 41 | { name: 'article:tag', description: 'Tag words associated with this article.' }, 42 | ], 43 | audio: [ 44 | { name: 'og:audio', description: 'A relevant audio URL for your object.' }, 45 | { name: 'og:audio:secure_url', description: 'A relevant, secure audio URL for your object.' }, 46 | { name: 'og:audio:type', description: 'The mime type of an audio file.' }, 47 | ], 48 | basic: [ 49 | { name: 'og:description', description: 'A one to two sentence description of your object.' }, 50 | { name: 'og:determiner', description: 'The word to precede the object\'s title in a sentence.' }, 51 | { name: 'og:ignore_canonical', description: '' }, 52 | { name: 'og:locale', description: 'A Unix locale in which this markup is rendered.' }, 53 | { name: 'og:locate:alternate', description: '' }, 54 | { name: 'og:site_name', description: 'If your object is part of a larger web site, the name which should be displayed for the overall site.' }, 55 | { name: 'og:title', description: 'The title of the object as it should appear within the graph.' }, 56 | { name: 'og:type', description: 'The type of your object, e.g., "movie". Depending on the type you specify, other properties may also be required.' }, 57 | { name: 'og:updated_time', description: '' }, 58 | { name: 'og:url', description: 'The canonical URL of your object that will be used as its permanent ID in the graph.' }, 59 | ], 60 | book: [ 61 | { name: 'book:author', description: 'Who wrote this book.' }, 62 | { name: 'book:isbn', description: 'The ISBN.' }, 63 | { name: 'book:release_date', description: 'The date the book was released.' }, 64 | { name: 'book:tag', description: 'Tag words associated with this book.' }, 65 | ], 66 | image: [ 67 | { name: 'og:image', description: 'An image URL which should represent your object within the graph.' }, 68 | { name: 'og:image:alt', description: 'A description of what is in the image (not a caption).' }, 69 | { name: 'og:image:height', description: 'The height of an image.' }, 70 | { name: 'og:image:secure_url', description: 'A secure image URL which should represent your object within the graph.' }, 71 | { name: 'og:image:type', description: 'The mime type of an image.' }, 72 | { name: 'og:image:url', description: 'An image URL which should represent your object within the graph.' }, 73 | { name: 'og:image:width', description: 'The width of an image.' }, 74 | ], 75 | profile: [ 76 | { name: 'profile:first_name', description: 'A name normally given to an individual by a parent or self-chosen.' }, 77 | { name: 'profile:last_name', description: 'A name inherited from a family or marriage and by which the individual is commonly known.' }, 78 | { name: 'profile:username', description: 'A short unique string to identify them.' }, 79 | { name: 'profile:gender', description: 'Their gender.' }, 80 | ], 81 | video: [ 82 | { name: 'og:video', description: 'A relevant video URL for your object.' }, 83 | { name: 'og:video:height', description: 'The height of a video.' }, 84 | { name: 'og:video:secure_url', description: 'A relevant, secure video URL for your object.' }, 85 | { name: 'og:video:type', description: 'The mime type of a video.' }, 86 | { name: 'og:video:width', description: 'The width of a video.' }, 87 | ], 88 | }; 89 | } 90 | 91 | /** 92 | * Returns a object with information of Shareaholic tags. 93 | * @returns {object} An object with information of Shareaholic tags. 94 | * @see https://github.com/shareaholic/shareaholic-api-docs/blob/master/shareaholic_meta_tags.md 95 | */ 96 | static tagsShareaholic() { 97 | return { 98 | content: [ 99 | { name: 'shareaholic:url', description: 'The canonical URL for the webpage.' }, 100 | { name: 'shareaholic:image', description: 'The URL of the image that represents the webpage.' }, 101 | { name: 'shareaholic:title', description: 'The title that represents the webpage.' }, 102 | { name: 'shareaholic:article_author_name', description: 'The name of the author of the content of the webpage' }, 103 | { name: 'shareaholic:article_author', description: 'An URL to the profile of the author of the content of the webpage.' }, 104 | { name: 'shareaholic:keywords', description: 'Keywords associated with the content of the webpage.' }, 105 | { name: 'shareaholic:language', description: 'Language of the content of the webpage.' }, 106 | { name: 'shareaholic:article_published_time', description: '(ISO 8601) - Timestamp for when the content of the webpage was first published.' }, 107 | { name: 'shareaholic:article_modified_time', description: '(ISO 8601) - Timestamp for when the content on the webpage was last modified.' }, 108 | { name: 'shareaholic:site_name', description: 'The site name which should be displayed for the overall site.' }, 109 | ], 110 | feature: [ 111 | { name: 'shareaholic:site_id', description: 'Your Shareaholic API Key / Site ID.' }, 112 | { name: 'shareaholic:article_visibility', description: 'Exclude from Recommendation Engine.' }, 113 | { name: 'shareaholic:article_visibility', description: 'Exclude from Recommendation Engine and all Analytics.' }, 114 | { name: 'shareaholic:shareable_page', description: 'Whether the webpage is shareable.' }, 115 | { name: 'shareaholic:outstreamads', description: 'Disables Outstream Video Ads.' }, 116 | { name: 'shareaholic:drupal_version', description: 'Shareaholic for Drupal module version (automatically added by module).' }, 117 | { name: 'shareaholic:wp_version', description: 'Shareaholic for WordPress plugin version (automatically added by plugin).' }, 118 | ], 119 | }; 120 | } 121 | 122 | /** 123 | * Returns the state whether the given tag name is a Dublin Core tag. 124 | * @param {string} tagName The tag name to check whether it is a Dublin Core tag. 125 | * @returns {boolean} State whether the given tag name is a Dublin Core tag. 126 | */ 127 | static isDublinCoreTag(tagName) { 128 | tagName = (tagName || '').toString().trim().toUpperCase(); 129 | return (tagName.startsWith('DC.') || tagName.startsWith('DCTERMS.')); 130 | } 131 | 132 | /** 133 | * Returns the state whether the given tag name is a known Open Graph Article tag. 134 | * @param {string} tagName The tag name to check whether it is a known Open Graph Article tag. 135 | * @returns {boolean} State whether the given tag name is a known Open Graph Article tag. 136 | */ 137 | static isOpenGraphArticleTag(tagName) { 138 | return (SEOInsights.Meta.tagsOpenGraph().article.filter(tag => tag.name === (tagName || '').toString().trim().toLowerCase()).length > 0); 139 | } 140 | 141 | /** 142 | * Returns the state whether the given tag name is a known Open Graph Audio tag. 143 | * @param {string} tagName The tag name to check whether it is a known Open Graph Audio tag. 144 | * @returns {boolean} State whether the given tag name is a known Open Graph Audio tag. 145 | */ 146 | static isOpenGraphAudioTag(tagName) { 147 | return (SEOInsights.Meta.tagsOpenGraph().audio.filter(tag => tag.name === (tagName || '').toString().trim().toLowerCase()).length > 0); 148 | } 149 | 150 | /** 151 | * Returns the state whether the given tag name is a known Open Graph Basic tag. 152 | * @param {string} tagName The tag name to check whether it is a known Open Graph Basic tag. 153 | * @returns {boolean} State whether the given tag name is known Open Graph Basic tag. 154 | */ 155 | static isOpenGraphBasicTag(tagName) { 156 | return (SEOInsights.Meta.tagsOpenGraph().basic.filter(tag => tag.name === (tagName || '').toString().trim().toLowerCase()).length > 0); 157 | } 158 | 159 | /** 160 | * Returns the state whether the given tag name is a known Open Graph Book tag. 161 | * @param {string} tagName The tag name to check whether it is a known Open Graph Book tag. 162 | * @returns {boolean} State whether the given tag name is a known Open Graph Book tag. 163 | */ 164 | static isOpenGraphBookTag(tagName) { 165 | return (SEOInsights.Meta.tagsOpenGraph().book.filter(tag => tag.name === (tagName || '').toString().trim().toLowerCase()).length > 0); 166 | } 167 | 168 | /** 169 | * Returns the state whether the given tag name is a known Open Graph Image tag. 170 | * @param {string} tagName The tag name to check whether it is a known Open Graph Image tag. 171 | * @returns {boolean} State whether the given tag name is a known Open Graph Image tag. 172 | */ 173 | static isOpenGraphImageTag(tagName) { 174 | return (SEOInsights.Meta.tagsOpenGraph().image.filter(tag => tag.name === (tagName || '').toString().trim().toLowerCase()).length > 0); 175 | } 176 | 177 | /** 178 | * Returns the state whether the given tag name is a known Open Graph Profile tag. 179 | * @param {string} tagName The tag name to check whether it is a known Open Graph Profile tag. 180 | * @returns {boolean} State whether the given tag name is a known Open Graph Profile tag. 181 | */ 182 | static isOpenGraphProfileTag(tagName) { 183 | return (SEOInsights.Meta.tagsOpenGraph().profile.filter(tag => tag.name === (tagName || '').toString().trim().toLowerCase()).length > 0); 184 | } 185 | 186 | /** 187 | * Returns the state whether the given tag name is a known Open Graph Video tag. 188 | * @param {string} tagName The tag name to check whether it is a known Open Graph Video tag. 189 | * @returns {boolean} State whether the given tag name is a known Open Graph Video tag. 190 | */ 191 | static isOpenGraphVideoTag(tagName) { 192 | return (SEOInsights.Meta.tagsOpenGraph().video.filter(tag => tag.name === (tagName || '').toString().trim().toLowerCase()).length > 0); 193 | } 194 | 195 | /** 196 | * Returns the state whether the given tag name is a known Open Graph tag. 197 | * @param {string} tagName The tag name to check whether it is a known Open Graph tag. 198 | * @returns {boolean} State whether the given tag name is a known Open Graph tag. 199 | */ 200 | static isOpenGraphTag(tagName) { 201 | return (SEOInsights.Meta.isOpenGraphArticleTag(tagName) || 202 | SEOInsights.Meta.isOpenGraphAudioTag(tagName) || 203 | SEOInsights.Meta.isOpenGraphBasicTag(tagName) || 204 | SEOInsights.Meta.isOpenGraphBookTag(tagName) || 205 | SEOInsights.Meta.isOpenGraphImageTag(tagName) || 206 | SEOInsights.Meta.isOpenGraphProfileTag(tagName) || 207 | SEOInsights.Meta.isOpenGraphVideoTag(tagName)); 208 | } 209 | 210 | /** 211 | * Returns the state whether the given tag name is a known Parse.ly tag. 212 | * @param {string} tagName The tag name to check whether it is a Parse.ly tag. 213 | * @returns {boolean} State whether the given tag name is a Parse.ly tag. 214 | */ 215 | static isParselyTag(tagName) { 216 | return (tagName || '').toString().trim().toLowerCase().startsWith('parsely-'); 217 | } 218 | 219 | /** 220 | * Returns the state whether the given tag name is a known Shareaholic Content tag. 221 | * @param {string} tagName The tag name to check whether it is a known Shareaholic Content tag. 222 | * @returns {boolean} State whether the given tag name is a known Shareaholic Content tag. 223 | */ 224 | static isShareaholicContentTag(tagName) { 225 | return (SEOInsights.Meta.tagsShareaholic().content.filter(tag => tag.name === (tagName || '').toString().trim().toLowerCase()).length > 0); 226 | } 227 | 228 | /** 229 | * Returns the state whether the given tag name is a known Shareaholic Feature tag. 230 | * @param {string} tagName The tag name to check whether it is a known Shareaholic Feature tag. 231 | * @returns {boolean} State whether the given tag name is a known Shareaholic Feature tag. 232 | */ 233 | static isShareaholicFeatureTag(tagName) { 234 | return (SEOInsights.Meta.tagsShareaholic().feature.filter(tag => tag.name === (tagName || '').toString().trim().toLowerCase()).length > 0); 235 | } 236 | 237 | /** 238 | * Returns the state whether the given tag name is a known Shareaholic tag. 239 | * @param {string} tagName The tag name to check whether it is a known Shareaholic tag. 240 | * @returns {boolean} State whether the given tag name is a known Shareaholic tag. 241 | */ 242 | static isShareaholicTag(tagName) { 243 | return (SEOInsights.Meta.isShareaholicContentTag(tagName) || SEOInsights.Meta.isShareaholicFeatureTag(tagName)); 244 | } 245 | 246 | /** 247 | * Returns the state whether the given tag name is a known Twitter tag. 248 | * @param {string} tagName The tag name to check whether it is a known Twitter tag. 249 | * @returns {boolean} State whether the given tag name is a known Twitter tag. 250 | */ 251 | static isTwitterTag(tagName) { 252 | return (tagName || '').toString().trim().toLowerCase().startsWith('twitter:'); 253 | } 254 | 255 | /** 256 | * Returns all found Dublin Core tags of the website. 257 | * @returns {Array} An array with all found Dublin Core tags of the website. 258 | */ 259 | static getDublineCoreTags() { 260 | const tagsDublinCore = []; 261 | 262 | // get all the Dublin Core meta tags from . 263 | $('head meta[name^="DC."], head meta[name^="DCTERMS."], head meta[property^="DC."], head meta[property^="DCTERMS."]').each(function() { 264 | tagsDublinCore.push({ 265 | name: (getName(this) || '').toString().trim(), 266 | value: ($(this).attr('content') || '').toString().trim(), 267 | }); 268 | }); 269 | 270 | // return all found Dublin Core tags. 271 | return tagsDublinCore; 272 | } 273 | 274 | /** 275 | * Returns all found Open Graph tags of the website. 276 | * @returns {Array} An array with all found Open Graph tags of the website. 277 | */ 278 | static getOpenGraphTags() { 279 | const tagsArticle = []; 280 | const tagsAudio = []; 281 | const tagsBasic = []; 282 | const tagsBook = []; 283 | const tagsImage = []; 284 | const tagsProfile = []; 285 | const tagsVideo = []; 286 | 287 | /** 288 | * There are different groups on the Open Graph tags. They are starting as described in this list: 289 | * 290 | * - article: "article:" 291 | * - audio: "og:audio" 292 | * - basic: "og:" 293 | * - book: "book:" 294 | * - image: "og:image" 295 | * - profile: "profile:" 296 | * - video: "og:video" 297 | * 298 | * It is possible to get all Open Graph tags with the following start values on name or property attribute: 299 | * 300 | * - "artcile:" 301 | * - "og:" 302 | * - "book:" 303 | * - "profile:" 304 | */ 305 | 306 | // get all the Open Graph tags of the website (using the name attribute on meta element). 307 | $('head meta[name^="og:"], head meta[name^="article:"], head meta[name^="book:"], head meta[name^="profile:"], head meta[property^="og:"], head meta[property^="article:"], head meta[property^="book:"], head meta[property^="profile:"]').each(function() { 308 | const tagName = (getName(this) || '').toString().trim(); 309 | 310 | // check the tag name to set the information to the correct array. 311 | if (SEOInsights.Meta.isOpenGraphArticleTag(tagName)) { 312 | tagsArticle.push({ name: tagName, value: ($(this).attr('content') || '').toString().trim() }); 313 | } else if (SEOInsights.Meta.isOpenGraphAudioTag(tagName)) { 314 | tagsAudio.push({ name: tagName, value: ($(this).attr('content') || '').toString().trim() }); 315 | } else if (SEOInsights.Meta.isOpenGraphBasicTag(tagName)) { 316 | tagsBasic.push({ name: tagName, value: ($(this).attr('content') || '').toString().trim() }); 317 | } else if (SEOInsights.Meta.isOpenGraphBookTag(tagName)) { 318 | tagsBook.push({ name: tagName, value: ($(this).attr('content') || '').toString().trim() }); 319 | } else if (SEOInsights.Meta.isOpenGraphImageTag(tagName)) { 320 | tagsImage.push({ name: tagName, value: ($(this).attr('content') || '').toString().trim() }); 321 | } else if (SEOInsights.Meta.isOpenGraphProfileTag(tagName)) { 322 | tagsProfile.push({ name: tagName, value: ($(this).attr('content') || '').toString().trim() }); 323 | } else if (SEOInsights.Meta.isOpenGraphVideoTag(tagName)) { 324 | tagsVideo.push({ name: tagName, value: ($(this).attr('content') || '').toString().trim() }); 325 | } 326 | }); 327 | 328 | // return all found Open Graph tags. 329 | return { 330 | article: tagsArticle, 331 | audio: tagsAudio, 332 | basic: tagsBasic, 333 | book: tagsBook, 334 | image: tagsImage, 335 | profile: tagsProfile, 336 | video: tagsVideo, 337 | }; 338 | } 339 | 340 | /** 341 | * Returns all found Parse.ly tags of the website. 342 | * @returns {Array} An array with all found Parse.ly tags of the website. 343 | */ 344 | static getParselyTags() { 345 | const tagsParsely = []; 346 | 347 | // get all the Parse.ly tags of the website (starting with Parsely-). 348 | $('head meta[name^="Parsely-"], head meta[property^="Parsely-"]').each(function() { 349 | tagsParsely.push({ 350 | name: (getName(this) || '').toString().trim(), 351 | value: ($(this).attr('content') || '').toString().trim(), 352 | }); 353 | }); 354 | 355 | // return all found Parse.ly tags. 356 | return tagsParsely; 357 | } 358 | 359 | /** 360 | * Returns all found Shareaholic tags of the website. 361 | * @returns {Array} An array with all found Shareaholic tags of the website. 362 | */ 363 | static getShareaholicTags() { 364 | const tagsContent = []; 365 | const tagsFeature = []; 366 | 367 | // get all the Shareaholic tags of the website (starting with shareaholic:). 368 | $('head meta[name^="shareaholic:"]').each(function() { 369 | const tagName = ($(this).attr('name') || '').toString().trim(); 370 | 371 | // check whether the current tag is a known Shareaholic Content tag. 372 | if (SEOInsights.Meta.isShareaholicContentTag(tagName)) { 373 | tagsContent.push({ 374 | name: tagName, 375 | value: ($(this).attr('content') || '').toString().trim(), 376 | }); 377 | } else if (SEOInsights.Meta.isShareaholicFeatureTag(tagName)) { 378 | tagsFeature.push({ 379 | name: tagName, 380 | value: ($(this).attr('content') || '').toString().trim(), 381 | }); 382 | } 383 | }); 384 | 385 | // return all found Shareaholic tags. 386 | return { 387 | content: tagsContent, 388 | feature: tagsFeature, 389 | }; 390 | } 391 | 392 | /** 393 | * Returns all found Twitter tags of the website. 394 | * @returns {Array} An array with all found Twitter tags of the website. 395 | */ 396 | static getTwitterTags() { 397 | const tagsTwitter = []; 398 | 399 | // get all the Twitter tags of the website (starting with twitter:). 400 | $('head meta[name^="twitter:"], head meta[property^="twitter:"]').each(function() { 401 | tagsTwitter.push({ 402 | name: (getName(this) || '').toString().trim(), 403 | value: ($(this).attr('content') || '').toString().trim(), 404 | }); 405 | }); 406 | 407 | // return all found Twitter tags. 408 | return tagsTwitter; 409 | } 410 | }; 411 | --------------------------------------------------------------------------------