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

Commit

Permalink
diff check for re-init
Browse files Browse the repository at this point in the history
  • Loading branch information
scottjehl committed Sep 15, 2015
1 parent cb2a437 commit 82c7570
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
3 changes: 1 addition & 2 deletions dist/xrayhtml.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! X-rayHTML - v1.0.3 - 2015-09-08
/*! X-rayHTML - v2.0.0 - 2015-09-15
* https://github.com/filamentgroup/x-rayhtml
* Copyright (c) 2015 ; Licensed MIT */

Expand Down Expand Up @@ -123,4 +123,3 @@
-webkit-transform: rotateY(0deg);
-moz-transform: rotateY(0deg);
}

18 changes: 8 additions & 10 deletions dist/xrayhtml.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@

/*
* View Source
* Generates copy/pastable markup from actual rendered markup.
*
* Copyright (c) 2012 Filament Group, Inc.
* Licensed under the MIT, GPL licenses.
*/
/*! X-rayHTML - v2.0.0 - 2015-09-15
* https://github.com/filamentgroup/x-rayhtml
* Copyright (c) 2015 ; Licensed MIT */

window.jQuery = window.jQuery || window.shoestring;

Expand Down Expand Up @@ -116,9 +111,12 @@ window.jQuery = window.jQuery || window.shoestring;
$.extend( $.fn[ pluginName ].prototype, methods );

// auto-init
var initted;
function init(){
$( o.initSelector )[ pluginName ]();
init = function(){};
if( !initted ){
$( o.initSelector )[ pluginName ]();
initted = true;
}
}
// init either on beforeenhance event or domready, whichever comes first.
$( document ).bind("beforeenhance", init );
Expand Down
7 changes: 5 additions & 2 deletions src/X-rayHTML.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,12 @@ window.jQuery = window.jQuery || window.shoestring;
$.extend( $.fn[ pluginName ].prototype, methods );

// auto-init
var initted;
function init(){
$( o.initSelector )[ pluginName ]();
init = function(){};
if( !initted ){
$( o.initSelector )[ pluginName ]();
initted = true;
}
}
// init either on beforeenhance event or domready, whichever comes first.
$( document ).bind("beforeenhance", init );
Expand Down

0 comments on commit 82c7570

Please sign in to comment.