mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
made scope test optional...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
cdbdf130de
commit
4f3476ec1a
15
Viewer/e.js
15
Viewer/e.js
@ -9,13 +9,14 @@
|
||||
**********************************************************************/
|
||||
|
||||
// Global scope pollution test...
|
||||
global.__global = {...global}
|
||||
global.scopeDiff = function(cur=global, base=__global){
|
||||
return Object.keys(cur)
|
||||
.filter(function(k){ return base[k] !== cur[k] })
|
||||
.reduce(function(res, k){
|
||||
res[k] = cur[k]
|
||||
return res }, {})}
|
||||
if(process.env.IMAGEGRID_DEBUG){
|
||||
global.__global = {...global}
|
||||
global.scopeDiff = function(cur=global, base=__global){
|
||||
return Object.keys(cur)
|
||||
.filter(function(k){ return base[k] !== cur[k] })
|
||||
.reduce(function(res, k){
|
||||
res[k] = cur[k]
|
||||
return res }, {})} }
|
||||
|
||||
|
||||
/*********************************************************************/
|
||||
|
||||
15
Viewer/ig.js
15
Viewer/ig.js
@ -9,13 +9,14 @@
|
||||
//var DEBUG = DEBUG != null ? DEBUG : true
|
||||
|
||||
// Global scope pollution test...
|
||||
global.__global = global.__global || {...global}
|
||||
global.scopeDiff = function(cur=global, base=__global){
|
||||
return Object.keys(cur)
|
||||
.filter(function(k){ return base[k] !== cur[k] })
|
||||
.reduce(function(res, k){
|
||||
res[k] = cur[k]
|
||||
return res }, {})}
|
||||
if(process.env.IMAGEGRID_DEBUG){
|
||||
global.__global = global.__global || {...global}
|
||||
global.scopeDiff = function(cur=global, base=__global){
|
||||
return Object.keys(cur)
|
||||
.filter(function(k){ return base[k] !== cur[k] })
|
||||
.reduce(function(res, k){
|
||||
res[k] = cur[k]
|
||||
return res }, {})} }
|
||||
|
||||
|
||||
/*********************************************************************/
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<!-- Scripts -->
|
||||
|
||||
<!-- Global scope pollution test -->
|
||||
<script>
|
||||
<!--script>
|
||||
var __window = {...window}
|
||||
function scopeDiff(cur=window, base=__window){
|
||||
return Object.keys(cur)
|
||||
@ -40,7 +40,7 @@ function scopeDiff(cur=window, base=__window){
|
||||
.reduce(function(res, k){
|
||||
res[k] = cur[k]
|
||||
return res }, {})}
|
||||
</script>
|
||||
</script-->
|
||||
|
||||
<!-- DevTools fail-safe for electron/nw... -->
|
||||
<script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user