From 3fd5fe06a36c5b054258ac8f98f7329cf8ccb320 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 13 Nov 2009 06:13:08 +0000 Subject: [PATCH] Remove unused eval() calls in Timeline code to avoid AMO flagging, though we should probably integrate a newer version of Timeline anyway --- chrome/skin/default/zotero/timeline/bundle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/skin/default/zotero/timeline/bundle.js b/chrome/skin/default/zotero/timeline/bundle.js index 48a6da1ad..b23f699c6 100644 --- a/chrome/skin/default/zotero/timeline/bundle.js +++ b/chrome/skin/default/zotero/timeline/bundle.js @@ -38,9 +38,9 @@ var eventPainter=new Timeline.DurationEventPainter(eventPainterParams);return{wi if("trackGap"in params){eventPainterParams.trackGap=params.trackGap;} var eventPainter=new Timeline.DurationEventPainter(eventPainterParams);return{width:params.width,eventSource:eventSource,timeZone:("timeZone"in params)?params.timeZone:0,ether:ether,etherPainter:etherPainter,eventPainter:eventPainter};};Timeline.getDefaultTheme=function(){if(Timeline._defaultTheme==null){Timeline._defaultTheme=Timeline.ClassicTheme.create(Timeline.Platform.getDefaultLocale());} return Timeline._defaultTheme;};Timeline.setDefaultTheme=function(theme){Timeline._defaultTheme=theme;};Timeline.loadXML=function(url,f){var fError=function(statusText,status,xmlhttp){alert("Failed to load data xml from "+url+"\n"+statusText);};var fDone=function(xmlhttp){var xml=xmlhttp.responseXML;if(!xml.documentElement&&xmlhttp.responseStream){xml.load(xmlhttp.responseStream);} -f(xml,url);};Timeline.XmlHttp.get(url,fError,fDone);};Timeline.loadJSON=function(url,f){var fError=function(statusText,status,xmlhttp){alert("Failed to load json data from "+url+"\n"+statusText);};var fDone=function(xmlhttp){f(eval('('+xmlhttp.responseText+')'),url);};Timeline.XmlHttp.get(url,fError,fDone);};Timeline._Impl=function(elmt,bandInfos,orientation,unit){this._containerDiv=elmt;this._bandInfos=bandInfos;this._orientation=orientation==null?Timeline.HORIZONTAL:orientation;this._unit=(unit!=null)?unit:Timeline.NativeDateUnit;this._initialize();};Timeline._Impl.prototype.dispose=function(){for(var i=0;i Loading...";this.showLoadingMessage=function(){message.containerDiv.style.display="block";};this.hideLoadingMessage=function(){message.containerDiv.style.display="none";};};Timeline._Impl.prototype._distributeWidths=function(){var length=this.getPixelLength();var width=this.getPixelWidth();var cumulativeWidth=0;for(var i=0;i0){var percent=parseInt(widthString.substr(0,x));var bandWidth=percent*width/100;}else{var bandWidth=parseInt(widthString);}