added site files
This commit is contained in:
parent
a6f70a6c78
commit
329148c253
253 changed files with 30486 additions and 0 deletions
30
EnlighterJS/Source/UI/CodeWindow.js
Normal file
30
EnlighterJS/Source/UI/CodeWindow.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
---
|
||||
name: CodeWindow
|
||||
description: Opens a new Window with the raw-sourcecode within
|
||||
|
||||
license: MIT-style X11 License
|
||||
|
||||
authors:
|
||||
- Andi Dittrich
|
||||
|
||||
requires:
|
||||
- Core/1.4.5
|
||||
|
||||
provides: [EnlighterJS.UI.CodeWindow]
|
||||
...
|
||||
*/
|
||||
EJS.UI.CodeWindow = (function(code){
|
||||
// code "cleanup"
|
||||
code = code.replace(/&/gim, '&').replace(/</gim, '<').replace(/>/gim, '>');
|
||||
|
||||
// open new window
|
||||
var w = window.open('', '', 'width=' + (window.screen.width -200) + ', height=' + (screen.height-300) + ', menubar=no, titlebar=no, toolbar=no, top=100, left=100, scrollbars=yes, status=no');
|
||||
|
||||
// insert code
|
||||
w.document.body.innerHTML = '<pre>' + code + '</pre>';
|
||||
w.document.title = 'EnlighterJS Sourcecode';
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue