0.01
No commit activity in last 3 years
No release in over 3 years
Genius Blocker is a piece of Rack Middleware designed to prevent unwanted annotations by News Genius. The middleware injects a small bit of JavaScript code into the <head></head> of a website in order to force a redirect to the original website whenever anyone attempts to prepend genius.it/ onto a website's URL for annotation purposes.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
>= 0
>= 0
~> 10.0
>= 0

Runtime

>= 0
 Project Readme

Genius::Blocker

Genius Blocker is a piece of Rack Middleware designed to prevent unwanted annotations by News Genius.

The middleware injects a small bit of JavaScript code into the <head></head> of a website in order to force a redirect to the original website whenever anyone attempts to prepend genius.it/ onto a website's URL for annotation purposes.

Installation

Add this line to your application's Gemfile:

gem 'genius-blocker'

And then execute:

$ bundle

Or install it yourself as:

$ gem install genius-blocker

Usage

For most applications, you can insert middleware into the config.ru file in the root of the application.

A simple config.ru in a Rails application might look like this after adding Genius::Blocker:

require ::File.expand_path('../config/environment',  __FILE__)

use Genius::Blocker
run MyRailsApp::Application

Contributing

Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. Any pull requests or issues that do not adhere to these guidelines will be ignored and/or deleted.

License

The gem is available as open source under the terms of the MIT License.