8 |
Event information for:
9 |
15 |
16 |
17 |
18 | | Type: |
19 | |
20 |
21 |
22 | | Aditional information: |
23 | |
24 |
25 |
26 |
27 |
The document finished loading and the "load" event was triggered!
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
144 |
145 |
--------------------------------------------------------------------------------
/thecmdchallenge/funcode/frame.1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
Event information for:
9 |
15 |
16 |
17 |
18 | | Type: |
19 | |
20 |
21 |
22 | | Aditional information: |
23 | |
24 |
25 |
26 |
27 |
The document finished loading and the "load" event was triggered!
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
144 |
145 |
--------------------------------------------------------------------------------
/thecmdchallenge/funcode/mouse.1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
Event information for:
9 |
15 |
16 |
17 |
18 | | Type: |
19 | |
20 |
21 |
22 | | Key code: |
23 | |
24 |
25 |
26 | | Key equivalent: |
27 | |
28 |
29 |
30 | | Event Phase: |
31 | |
32 |
33 |
34 | | Event Bubbles: |
35 | |
36 |
37 |
38 |
Press any keyboard key!
39 |
The event information returns the Key Code that the user pressed, you need to know what code is assiegn to each key..
40 |
41 |
255 |
256 |
--------------------------------------------------------------------------------
/thecmdchallenge/funcode/keyboard.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
Event information for:
9 |
15 |
16 |
17 |
18 | | Type: |
19 | |
20 |
21 |
22 | | Key code: |
23 | |
24 |
25 |
26 | | Key equivalent: |
27 | |
28 |
29 |
30 | | Event Phase: |
31 | |
32 |
33 |
34 | | Event Bubbles: |
35 | |
36 |
37 |
38 |
Press any keyboard key!
39 |
The event information returns the Key Code that the user pressed, you need to know what code is assiegn to each key..
40 |
41 |
255 |
256 |
--------------------------------------------------------------------------------
/thecmdchallenge/funcode/regexer.1.js:
--------------------------------------------------------------------------------
1 |
2 | var RegExer = function(appendToElem,dExpression,dContent)
3 | {
4 | // Parameter & Elements
5 | var parentElem,
6 | regexInputWrapperElem,
7 | regexInputElem,
8 | regexInputHighlightElem,
9 | regexOutputWrapperElem,
10 | regexOutputTextElem,
11 | regexOutputHighlightElem,
12 | regularExpression,
13 | regularExpressionParser,
14 | regexOutputReplaceElem,
15 | regexInputReplaceElem,
16 |
17 | regexControllArea,
18 | regexControllButtonMatch,
19 | regexControllButtonReplace,
20 |
21 | regexGroups = [],
22 | regexPositionToGroup = [],
23 | useCSSC = false, //experemental with alpha version of CSSC
24 | parseError = false,
25 | mode = "match";
26 |
27 | // Methods
28 | var init = function()
29 | {
30 | if(!appendToElem)
31 | {
32 | parentElem = document.body;
33 | }
34 | else if(typeof appendToElem === 'string')
35 | {
36 | parentElem = document.getElementById(appendToElem);
37 | }
38 | else
39 | {
40 | parentElem = appendToElem;
41 | }
42 |
43 | //Create Elements
44 | //Input
45 | regexInputWrapperElem = document.createElement('div');
46 | regexInputWrapperElem.setAttribute("id", "regexer_input");
47 |
48 | regexInputElem = document.createElement('textarea');
49 | regexInputElem.setAttribute("id", "regexer_input_input");
50 | regexInputElem.placeholder = "Type your regex here...";
51 | if(dExpression && dExpression!='')
52 | {
53 | setDefaultExpression(dExpression);
54 | }
55 | else
56 | {
57 | //s
58 | setDefaultExpression("([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})");
59 | }
60 |
61 | regexInputHighlightElem = document.createElement("pre");
62 | regexInputHighlightElem.setAttribute("id", "regexer_input_pre");
63 |
64 |
65 | //Output
66 | regexOutputWrapperElem = document.createElement("div");
67 | regexOutputWrapperElem.setAttribute("id", "regexer_text");
68 |
69 | regexOutputTextElem = document.createElement("textarea");
70 | regexOutputTextElem.setAttribute("id", "regexer_text_txt");
71 | if(dContent && dContent!='')
72 | {
73 | setDefaultContent(dContent.replace(/[\r\n]/g, "
"));
74 | }
75 | else setDefaultContent(
76 | "This is an example text, this text contains emails, phone numbers and other sample designed for testing purposes. To use this tool, please type a regular expression in the text-area above.
" +
77 | "When designing regex for emails make sure you cover all possible email types like: info@breatheco.de, dragon23@gmail.com, dragon_ball@yahoo.com.us and also test for bad email formats like ramond=32@skas.com
" +
78 | "When texting for urls you have samples like this: https://thedomain.com.ve/dir1/dir2.html, some urls don't have extensions like this http://www.thedomain.net/directory1, maybe you will find some urls with nested subdomains like http://test.www.thedomain.com.ve/directory1"
79 | );
80 |
81 | regexOutputHighlightElem = document.createElement("pre");
82 | regexOutputHighlightElem.setAttribute("id", "regexer_text_pre");
83 |
84 | /* Controlls */
85 | regexControllArea = document.createElement("div");
86 | regexControllArea.setAttribute("id", "regex_controll");
87 |
88 | regexControllButtonMatch = document.createElement("a");
89 | regexControllButtonMatch.setAttribute("id", "regex_controll_match");
90 | if(mode === "match") regexControllButtonMatch.setAttribute("class", "sel");
91 | regexControllButtonMatch.innerHTML = "match";
92 | regexControllArea.appendChild(regexControllButtonMatch);
93 |
94 | parentElem.appendChild(regexControllArea);
95 | /* /Controlls */
96 |
97 | //Append Elements in DOM
98 | parentElem.appendChild(regexInputWrapperElem);
99 | regexInputWrapperElem.appendChild(regexInputElem);
100 | regexInputWrapperElem.appendChild(regexInputHighlightElem);
101 |
102 |
103 | parentElem.appendChild(regexOutputWrapperElem);
104 | regexOutputWrapperElem.appendChild(regexOutputTextElem);
105 | regexOutputWrapperElem.appendChild(regexOutputHighlightElem);
106 |
107 | setOutputHeight();
108 |
109 | manageEvents();
110 |
111 | },
112 | setDefaultExpression = function(defaultExpression)
113 | {
114 | var tempRegex = defaultExpression;
115 | regexInputElem.innerHTML = tempRegex;
116 | regexInputElem.value = tempRegex;
117 | },
118 | setDefaultContent = function(defaultContent)
119 | {
120 | regexOutputTextElem.innerHTML = defaultContent;
121 |
122 | },
123 | setOutputHeight = function()
124 | {
125 | if(useCSSC)
126 | {
127 | //CSSC("#"+regexOutputTextElem.getAttribute("id")).set("height", regexOutputHighlightElem.offsetHeight+"px");
128 | }
129 | else
130 | {
131 | //regexOutputTextElem.style.height = regexOutputHighlightElem.offsetHeight+"px";
132 | }
133 | },
134 | manageEvents = function()
135 | {
136 | var keyUpParseControll = function(e)
137 | {
138 | var parsed = false;
139 |
140 | if
141 | (!(
142 | (
143 | e.keyCode <= 40 &&
144 | (
145 | e.keyCode !== 13 && e.keyCode !== 8 &&
146 | e.keyCode !== 9 && e.keyCode !== 32
147 | )
148 | )
149 | ||
150 | (
151 | e.keyCode >= 112 && e.keyCode <= 150
152 | )
153 | ||
154 | e.keyCode === 91
155 | ||
156 | e.keyCode === 92
157 | ))
158 | {
159 | parse();
160 | parsed = true;
161 | }
162 |
163 | highlight();
164 |
165 | return parsed;
166 | };
167 |
168 | regexOutputTextElem.addEventListener("scroll", function()
169 | {
170 | regexOutputHighlightElem.scrollTop = this.scrollTop;
171 | });
172 |
173 | regexOutputTextElem.addEventListener("change", function()
174 | {
175 | regexOutputHighlightElem.innerHTML = '";
741 | fields = Dropzone.createElement(fieldsString);
742 | if (this.element.tagName !== "FORM") {
743 | form = Dropzone.createElement("