mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Fix iFrame issue where console is set to top. and change to window.
This commit is contained in:
parent
82f427422a
commit
b26b1ebf15
1 changed files with 4 additions and 3 deletions
|
@ -73,8 +73,8 @@ function OUTER(gscope) {
|
|||
var iframePadTop = EDIT_BODY_PADDING_TOP;
|
||||
var iframePadBottom = 0, iframePadRight = 0;
|
||||
|
||||
var console = (DEBUG && top.console);
|
||||
if (! console) {
|
||||
var console = (DEBUG && window.console);
|
||||
if (! window.console) {
|
||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
||||
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
||||
console = {};
|
||||
|
@ -82,6 +82,7 @@ function OUTER(gscope) {
|
|||
console[names[i]] = function() {};
|
||||
//console.error = function(str) { alert(str); };
|
||||
}
|
||||
|
||||
var PROFILER = window.PROFILER;
|
||||
if (!PROFILER) {
|
||||
PROFILER = function() { return {start:noop, mark:noop, literal:noop, end:noop, cancel:noop}; };
|
||||
|
@ -1311,7 +1312,7 @@ function OUTER(gscope) {
|
|||
|
||||
isTimeUp = (isTimeUp || function() { return false; });
|
||||
|
||||
if (DEBUG && top.DONT_INCORP || window.DEBUG_DONT_INCORP) return false;
|
||||
if (DEBUG && window.DONT_INCORP || window.DEBUG_DONT_INCORP) return false;
|
||||
|
||||
var p = PROFILER("incorp", false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue