GithubHelp home page GithubHelp logo

prizraksarvar / rex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cgrossde/rex

0.0 1.0 0.0 1.15 MB

Chrome extension for regex highlighting or collapsing text.

License: GNU General Public License v2.0

JavaScript 98.55% CSS 0.15% HTML 1.31%

rex's Introduction

Rex - Highlight or Collapse Text

This extension allows to use regular expressions to highlight or collapse text on a web page. It was developed to facilitate log analysis (e.g. highlight important parts of stacktraces, collapsing framework noise)

Install from Chrome Web Store

Features

  • Use regex to highlight text
  • Use regex to collapse text
  • Define different colors for each regex
  • Profiles to organize regex in groups
  • Url matcher to define on which pages profile should be active
  • Temporarily enable/disable regex

Todo

  • Allow to collapse text that contains other dom nodes (e.g. span for styling, images, ...)
  • Export settings and import them from URL (e.g. store settings in git with code)
  • (Auto?)-update imported settings
  • Execute custom JS

Why Rex?

The name is inspired by the austrian tv show "Inspector Rex". The main character, a german shephard named Rex, is a police dog that helps find evidence and solve crimes (https://en.wikipedia.org/wiki/Inspector_Rex).

Screenshots

Extension active Screenshot

Extension options Options

Credits

This extension was inspired by linkuha/ext-resh.

Export profiles hack

chrome.storage.sync.get(['profiles'], async ({profiles}) => {
  console.log(JSON.stringify(profiles))
})

import profiles hack

let a = JSON.parse('[{"collapse":[{"active":false,"color":"#CCC","startRegEx":"at com.sun.jersey.api","stopRegEx":"at com.apache.catalina","title":"Framework noise"}],"highlight":[{"active":true,"color":"#c2cc4e","regEx":"lorem"},{"active":true,"color":"#b1f6a0","regEx":"ipsum"}],"id":"1","name":"Default","pages":[{"active":true,"regEx":"google"}]},{"collapse":[{"active":true,"color":"#d0c7ff","startRegEx":"\\"url\\":\\"[^\\"]{90}","stopRegEx":"[^\\"]+\\"","title":"url"}],"highlight":[{"active":true,"color":"#fcffbd","regEx":"\\"level\\":\\"warn\\""},{"active":true,"color":"#ffa3a3","regEx":"\\"level\\":\\"error\\""},{"active":true,"color":"#d1ffe7","regEx":"\\"msg\\":\\"[^\\"]*\\""}],"id":"7620BE30-9F09-FC3F-AA3D-71E7D1573CE3","name":"kibana","pages":[{"active":true,"regEx":"(http://10.10.10.10:5601|https://example.com/kibana/app/).*"}]}]');
chrome.storage.sync.set({profiles: a}, () => {console.log("completed")});

rex's People

Contributors

cgrossde avatar prizraksarvar avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.