File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 172172 <li><a nohref onclick="ICEcoder.uploadFilesSelect(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Upload...</a></li>
173173 <li><a nohref onclick="ICEcoder.zipIt(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Zip</a></li>
174174 <li><a nohref onclick="ICEcoder.propertiesScreen(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Properties...</a></li>
175+ <li><a nohref onClick="ICEcoder.printCode()">Print...</a></li>
175176 <li><a nohref onClick="ICEcoder.fullScreenSwitcher()">Fullscreen toggle</a></li>
176177 <li><a nohref onClick="ICEcoder.logout()">Logout</a></li>
177178 </ul>
Original file line number Diff line number Diff line change @@ -2001,6 +2001,20 @@ var ICEcoder = {
20012001 . replace ( / ' / g, "'" ) ;
20022002 } ,
20032003
2004+ // Print code of current tab
2005+ printCode : function ( ) {
2006+ var cM , printIFrame ;
2007+
2008+ cM = top . ICEcoder . getcMInstance ( ) ;
2009+ printIFrame = top . ICEcoder . filesFrame . contentWindow . frames [ 'fileControl' ] ;
2010+ // Print page content injected into iFrame, escaped with pre and xssClean
2011+ printIFrame . window . document . body . innerHTML = '<!DOCTYPE html><head><title>ICEcoder code output</title></head><body><pre>' + top . ICEcoder . xssClean ( cM . getValue ( ) ) + '</pre></body></html>' ;
2012+ printIFrame . focus ( ) ;
2013+ printIFrame . print ( ) ;
2014+ // Focus back on code
2015+ cM . focus ( ) ;
2016+ } ,
2017+
20042018// ==============
20052019// TABS
20062020// ==============
You can’t perform that action at this time.
0 commit comments