-
Notifications
You must be signed in to change notification settings - Fork 0
/
paste.page
150 lines (146 loc) · 3.23 KB
/
paste.page
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<html>
<head>
<title>%title%</title>
<link rel="shortcut icon" href="http://nanner.tk/images/favicon.png" type="image/png">
<style type="text/css">
@font-face {
font-family: OpenSans;
src: url('./styles/Open_Sans/OpenSans-Light.ttf');
}
html,body {
width:100%;
height:100%;
background-color:#3A5C83;
}
* {
padding:0;
margin:0;
}
.text {
font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, monospace, serif;
line-height: 21px;
margin-left:%lineNumberWidth%px;
padding-left:9px;
background-color:white;
border-left:1px solid #112233;
background-color:#223344;
color:#223344;
}
.textcontent {
word-wrap:break-word;
color:#A9A9A9;
}
#controlbox {
position:fixed;
right: 0;
width:100px;
height:42px;
z-index:2;
font-family:OpenSans;
background-color:rgba(26,26,26,0.5);
}
#save:hover:after {
display:inline;
font-size:15px;
padding-left:3px;
color:#EBF4F1;
background-color:#333;
background-color: rgba(0,0,0,.2);;
border-bottom-left-radius: 5px;
content: "Copy & Edit\A control + s";
white-space: pre;
position: absolute;
top:42px;
right:-3px;
width:100px;
z-index: 99;
}
#save {
cursor:pointer;
margin:5px;
margin-right:11px;
width:32px;
height:32px;
display:inline-block;
background-image:url(./images/save.png);
}
#new:hover:after {
display:inline;
font-size:15px;
padding-left:2px;
color:#EBF4F1;
background-color:#333;
background-color: rgba(0,0,0,.2);
content: "New\A control + m";
border-bottom-left-radius: 5px;
white-space: pre;
position: absolute;
top:42px;
right:-3px;
width:100px;
z-index: 99;
}
#new {
cursor:pointer;
margin:5px;
margin-left:10px;
width:32px;
height:32px;
display:inline-block;
background-image:url(./images/new.png)
}
/** Fancy webkit scrollbar for the strong! **/
::-webkit-scrollbar {
width: 12px;
margin-right:2px;
background-color:#223344;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
::-webkit-scrollbar-corner {
background-color:rgba(0,0,0,0);
}
</style>
</head>
<body>
<p id="pastenum" style="display:none">%pasteNum%</p>
<div id="controlbox">
<div id="save" onclick="pastebin()"></div>
<div id="new" onclick="clearbox()"></div>
</div>
%content%
<script type="text/javascript">
//keycode things
var isCtrl = false;
document.onkeyup=function(e){
if(e.keyCode == 17) {
isCtrl=false;
}
}
document.onkeydown=function(e){
if (e.keyCode == 17) {
isCtrl=true;
}
if (e.keyCode == 83 && isCtrl == true) {
pastebin();
isCtrl = false;
e.preventDefault();
} else if (e.keyCode == 77 && isCtrl == true) {
window.location = ".";
isCtrl = false;
e.preventDefault();
}
}
function pastebin() {
window.location = ".?new="+ document.getElementById("pastenum").innerHTML;
}
</script>
</body>
</html>