Coder Social home page Coder Social logo

jreject's Introduction

jReject - jQuery Browser Rejection Plugin

Created by Steven Bower TurnWheel Designs (2009-2014)

Concept based on "IE6 Upgrade Warning" library.

View doc.html for documentation and examples, or visit jreject.turnwheel.com

Important Note about jQuery Versions Supported by jQuery 1.7+ & 2.0+ If you wish to reject IE 6-8 or earlier, you must use jQuery 1.11.x or lower.

Licensing:

This library is dual licensed under the MIT and GPLv2 licenses.

Default Options:

options = {
	// Specifies which browsers/versions will be blocked
	reject : {
		all: false, // Covers Everything (Nothing blocked)
		msie: 6 // Covers MSIE <= 6 (Blocked by default)
		/*
		 * Many possible combinations.
		 * You can specify browser (msie, chrome, firefox)
		 * You can specify rendering engine (geko, trident)
		 * You can specify OS (Win, Mac, Linux, Solaris, iPhone, iPad)
		 *
		 * You can specify versions of each.
		 * Examples: msie9: true, firefox8: true,
		 *
		 * You can specify the highest number to reject.
		 * Example: msie: 9 (9 and lower are rejected.
		 *
		 * There is also "unknown" that covers what isn't detected
		 * Example: unknown: true
		 */
	},
	display: [], // What browsers to display and their order (default set below)
	browserShow: true, // Should the browser options be shown?
	browserInfo: { // Settings for which browsers to display
		chrome: {
			// Text below the icon
			text: 'Google Chrome',
			// URL For icon/text link
			url: 'http://www.google.com/chrome/',
			// (Optional) Use "allow" to customized when to show this option
			// Example: to show chrome only for IE users
			// allow: { all: false, msie: true }
		},
		firefox: {
			text: 'Mozilla Firefox',
			url: 'http://www.mozilla.com/firefox/'
		},
		safari: {
			text: 'Safari',
			url: 'http://www.apple.com/safari/download/'
		},
		opera: {
			text: 'Opera',
			url: 'http://www.opera.com/download/'
		},
		msie: {
			text: 'Internet Explorer',
			url: 'http://www.microsoft.com/windows/Internet-explorer/'
		}
	},

	// Pop-up Window Text
	header: 'Did you know that your Internet Browser is out of date?',

	paragraph1: 'Your browser is out of date, and may not be compatible with '+
				'our website. A list of the most popular web browsers can be '+
				'found below.',

	paragraph2: 'Just click on the icons to get to the download page',

	// Allow closing of window
	close: true,

	// Message displayed below closing link
	closeMessage: 'By closing this window you acknowledge that your experience '+
					'on this website may be degraded',
	closeLink: 'Close This Window',
	closeURL: '#',

	// Allows closing of window with esc key
	closeESC: true,

	// Use cookies to remmember if window was closed previously?
	closeCookie: false,
	// Cookie settings are only used if closeCookie is true
	cookieSettings: {
		// Path for the cookie to be saved on
		// Should be root domain in most cases
		path: '/',
		// Expiration Date (in seconds)
		// 0 (default) means it ends with the current session
		expires: 0
	},

	// Path where images are located
	imagePath: './images/',
	// Background color for overlay
	overlayBgColor: '#000',
	// Background transparency (0-1)
	overlayOpacity: 0.8,

	// Fade in time on open ('slow','medium','fast' or integer in ms)
	fadeInTime: 'fast',
	// Fade out time on close ('slow','medium','fast' or integer in ms)
	fadeOutTime: 'fast',

	// Google Analytics Link Tracking (Optional)
	// Set to true to enable
	// Note: Analytics tracking code must be added separately
	analytics: false
};

Run On load (Default Options): $(function() { $.reject(); });

jreject's People

Contributors

akkuma avatar bryanagee avatar chrismbarr avatar dietergeerts avatar entendu avatar everbuild avatar jberlinsky avatar jeppeknockaert avatar mchv avatar minijoomla avatar russellporter avatar vrnagy avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

fefoweb

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.