Created
October 18, 2012 17:15
-
-
Save adjohu/3913410 to your computer and use it in GitHub Desktop.
updateOpenTagState
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var isObject = function (foo) { | |
return foo.constructor == Object; | |
}; | |
var mixin = function (a, b) { | |
for (var property in b) { | |
if (b.hasOwnProperty(property)) { | |
if (isObject(b[property])) { | |
if (a.hasOwnProperty(property)) { | |
mixin(a[property], b[property]); | |
continue; | |
} | |
} | |
a[property] = b[property]; | |
} | |
} | |
return a; | |
}; | |
window.otUpdateListeners = window.otUpdateListeners || []; | |
window.updateOpenTagState = function (uv) { | |
window.universal_variable = window.universal_variable || {}; | |
window.prev_universal_variable = window.universal_variable; | |
mixin(window.universal_variable, uv); | |
window._qtd.push({resendUniversalVariables: 1}); | |
for (var i = 0, ii = window.otUpdateListeners.length; i < ii; i++) { | |
var l = otUpdateListeners[i]; | |
l(true); | |
} | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment