Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Latest commit

 

History

History
112 lines (90 loc) · 4.13 KB

README.md

File metadata and controls

112 lines (90 loc) · 4.13 KB

Tribe Sniffer

Author: Andras Guseo
Current version: 2.0.0
Release date: November 26, 2020

Description

This is a tool created for the Support Team at Modern Tribe | The Events Calendar.

  • tribe-sniffer.user.js - TamperMonkey script
  • tribe-sniffer.min.js - Bookmarklet script

What does it do?

The script adds a sniffer button to the lower right corner of each webpage. With clicking on the button on a WordPress site that is running our plugins the sniffer will check the following attributes on the page:

Page attributes

  • Is it Single Event view?
    • Which editor was used? Classic or Block?
  • Is it V1 or V2 design?
  • Is this a default calendar page or was it generated by a shortcode?
    • Built-in shortcode
    • The Events Calendar Shortcode & Block
    • The Events Calendar Shortcode and Templates Addon

Environment and version numbers

  • Theme
  • WordPress
  • The Events Calendar
  • Events Calendar Pro
  • Filter Bar
  • Event Tickets
  • Event Tickets Plus
  • WooCommerce
  • WPML

Is a caching plugin in use?

The sniffer checks for the presence of the following caching plugins:

  • Asset CleanUp: Page Speed Booster
  • Autoptimize
  • Endurance Page Cache
  • Hummingbird
  • LiteSpeed Cache
  • Swift Performance Caching Plugin
  • WP Fastest Cache
  • WP Rocket
  • WP-Super-Cache
  • WP Super Minify
  • W3 Total Cache

How to use it

This tool can be used as a TamperMonkey script. The old bookmarklet version (1.3) still works but is no longer being maintained.

Install as a TamperMonkey script

As you would any other Tampermonkey Scripts. Please refer to the readme file in the root of this repository.

Quick deploy as a bookmarklet (version 1.3)

  1. Copy the one-line script from tribe-sniffer.min.js to your clipboard.
  2. In your preferred browser create a new bookmark button on the bookmark bar.
  3. Name it "Tribe Sniffer" or whatever you like.
  4. Paste the code into the location / URL field and save it.
  5. When visiting a webpage click on the bookmark button. A popup dialog will contain the information.

Slow deploy as a bookmarklet

The non-minified file is a TamperMonkey script. It will run on the websites defined with @include, which currently is all the sites.

To use it as a bookmarklet you will need to minimize the script. You can use an online tool like https://javascript-minifier.com/

Here are the steps to create a bookmarklet from the code:

  1. Take the popup() function (starting with function and ending with }) and run it through the minifier.
  2. Change the beginning from function popup() to javascript:(function(). (Delete popup and add javacript:(.)
  3. Change the end from }; to })();. (Add a closing parentheses )(); after the curly bracket }.)
  4. Select the minified code and copy it on your clipboard.
  5. In your preferred browser create a new bookmark button on the bookmark bar.
  6. Name it "Tribe Sniffer" or whatever you like.
  7. Paste the code into the location / URL field and save it.
  8. When visiting a webpage click on the bookmark button. A popup dialog will contain the information.

Sample screenshot

image

Changelog

2.0.0 - 2020-11-26

  • Refactored the script from ground up. It works now fully as a TamperMonkey script.
  • Added Divi version number recognition
  • Added Filter Bar updated design version recognition
  • Added Swift Performance Caching Plugin to the plugin list

1.3.0 - 2020-09-29

  • Improved WooCommerce version recognition
  • Added Asset CleanUp: Page Speed Booster to the caching plugin list
  • Added WP Super Minify to the caching plugin list
  • Added WPML recognition

1.2.0 - 2020-09-18

  • Made it work like a TamperMonkey script. The script will now add a button at the bottom right corner of every page
  • Improved 3rd party shortcode detection

1.1.0 - 2020-09-17

  • Improved theme detection
  • Improved version number detection to adequately display "not found" when version number is not found
  • Added Endurance Page Cache to the caching plugin list
  • Added LiteSpeed Cache to the caching plugin list

1.0.0 - 2020-04-26

  • Initial release