/    Sign up×
Community /Pin to ProfileBookmark

Codeviewer v1.0

Here is a document I made to help myself, and I guess, the community.
Its main function was to [U]eliminate[/U] the save document/refresh way of previewing documents.
if you belief that there my be a hack, virus, ect… in the code, here it is for you to check.
So far I have Checked IE Firefox and Chrome with this code and it seems to work correctly.
You may copy, and paste and keep forever if you wish, but i just want feedback and you not to fiddle with it too much.
New Versions may be posted if I get enough feedback.

[code=html]<!– Codeviewer v1.0 –><html>
<head>
<script type=”text/javascript”>
var name=”Codeviewer”;
var version=”v1.0″;
document.title.value=name+” “+version;
var doc;
function win()
{

doc=window.open();
doc.document.write(“<!–document edited by Codeviewer V1.0–>n<html><head>”);
doc.document.write(a.value);
doc.document.write(“</head><body>”);
doc.document.write(a1.value);
doc.document.write(“</body></html>”);
doc.focus();
}
</script>
<script type=”text/javascript”>
function getCode()
{
d.style.display=”inline”;code.value=”<!– document edited by “+name+” “+version+” –>n<html>n<head>n”+a.value+”n</head>n<body>n”+a1.value+”n</body>n</html>”;
dd.style.display=”inline”;

}
</script>
<script type=”text/javascript”>
function closeCode()
{
d.style.display=”none”
dd.style.display=”none”;
}
</script>
<style>
body{overflow:hidden;}
#d{display:none;}
#dd{display:none;}
#e{z-index:2;position:absolute;top:0;left:0;opacity:0.5;filter:alpha(opacity=50);background-color:black;height:1000%;width:1000%;}
#bar{border-width:1px;border-style:solid;border-color:black;z-index:3;position:absolute;top:15%;left:25%;width:50%;height:5%;background-color:white;}
#close{cursor:pointer;border-width:1px;border-style:solid;border-color:black;position:absolute;top:16%;left:70%;height:3%;width:3%;z-index:4;text-align:center;background-color:red;}
#code{border-width:1px;border-style:solid;border-color:black;height:65%;width:50%;position:absolute;top:20%;left:25%;z-index:3;background-color:white;overflow:scroll;wrap:logical;}
#logoc{color:red;font-size:40px;font-family:times;position:relative;left:33px;top:5px}
#a{width:98%;height:30%;}
#a1{width:98%;height:35%;}
#GetCode{width:100%;}
#Preview{width:100%;}
#logo-c{color:black;font-size:40px;font-family:times;position:relative;left:7px;top:7px}
</style>
</head>

<body>
<div id=”d”>
<div id=”e”></div>
<div id=”dd”>
<div id=”bar”></div>
<div id=”close” onclick=”closeCode()”>X</div>
<textarea id=”code”></textarea>
</div>
</div>
Head
<hr width=”90%” />
<textarea id=”a” border=”1″></textarea><br />
Body
<hr width=”90%” />
<textarea id=”a1″ border=”1″></textarea><br />
<form>
<span id=”center”><input id=”Preview” type=”button” value=”Click to Preview” onclick=”win()” /><br />
<span id=”center”><input id=”GetCode” type=”button” value=”Get Code” onclick=”getCode();” />
</form><hr />
<span id=”logoc”>C</span><span id=”logo-C”>C</span>odeviewer | V1.0
</body>
</html>[/code]

to post a comment
Full-stack Developer

0Be the first to comment 😎

×

Success!

Help @Hud4007 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...