Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CSS-Tricks/The-Printliminator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMottie <wowmotty@gmail.com>2015-08-23 20:38:24 +0300
committerMottie <wowmotty@gmail.com>2015-08-24 19:05:26 +0300
commitf7f782a2a0da2b297fa9c1bf7c89e5c09638e9ef (patch)
tree6f83c45122b9471a71bec339a07226b804d66a7a /src
parent499adbd59e8958c1596b7ae60d410a733de7650a (diff)
Remove unused variable
Diffstat (limited to 'src')
-rw-r--r--src/printliminator.js33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/printliminator.js b/src/printliminator.js
index 12df31a..d650cc3 100644
--- a/src/printliminator.js
+++ b/src/printliminator.js
@@ -4,7 +4,6 @@ function csstricksPrintliminator( jQ ) {
var $ = jQ.noConflict(),
history = [],
flags = {},
- dont = false,
// if local, load local sprite image
sprite = ( window.location.origin === 'file://' ? '' : '//css-tricks.github.io/The-Printliminator/' ) +
'printliminator.png',
@@ -64,28 +63,26 @@ function csstricksPrintliminator( jQ ) {
$( 'body *:not(._print_controls, ._print_controls *)' )
.live( 'click', function( e ) {
- if ( !dont ) {
- e.preventDefault();
- var $done,
- $this = $( this );
- if ( e.altKey ) {
- $done = $( 'body *' )
- .not( '._print_controls, ._print_controls *, style' )
- .not( $this.parents().andSelf() )
- .not( $this.find( '*' ) )
- .addClass( '_print_removed' );
- } else {
- $done = $this;
- }
- $done.addClass( '_print_removed' );
- history.push( $done );
+ e.preventDefault();
+ var $done,
+ $this = $( this );
+ if ( e.altKey ) {
+ $done = $( 'body *' )
+ .not( '._print_controls, ._print_controls *, style' )
+ .not( $this.parents().andSelf() )
+ .not( $this.find( '*' ) )
+ .addClass( '_print_removed' );
+ } else {
+ $done = $this;
}
+ $done.addClass( '_print_removed' );
+ history.push( $done );
})
.live( 'mouseover', function() {
- if ( !dont ) { $(this).addClass( '_printliminator_highlight' ); }
+ $(this).addClass( '_printliminator_highlight' );
})
.live( 'mouseout', function() {
- if ( !dont ) { $(this).removeClass( '_printliminator_highlight' ); }
+ $(this).removeClass( '_printliminator_highlight' );
});
var $controls = $( '<div class="_print_controls">' )