Commit 14fb1efa20c5fded7b306d37b739d6c386aaec47

Authored by Ahmed Owian
1 parent 3d21c3b19a
Exists in master

Added prototype

Updated .gitignore to ignore all log files
Removed enterprise from run.sh
1 .classpath 1 .classpath
2 .project 2 .project
3 .settings/ 3 .settings/
4 target/ 4 target/
5 alf_data_dev/ 5 alf_data_dev/
6 *.log 6 *.log*
7 7
prototype/alfresco-skype-uri.js
File was created 1 /*jshint -W003:true */
2 /*jshint -W107:true */
3 /*jshint -W057:true */
4
5 var Skype = new function () {
6 this.name = null;
7 this.element = null;
8 this.participants = ["echo123"];
9 this.listParticipants = "false";
10 this.video = "false";
11 this.topic = null;
12 this.listTopic = "false";
13 this.imageSize = null;
14 this.imageColor = null;
15 this.useDetection = "true";
16 this.protocol = "skype:";
17 this.version = "1.1.7";
18 this.httpProtocol = window.location.protocol !== "https:" ? "http:" : "https:";
19 this.assetsDomain = this.httpProtocol + "//" + (this.httpProtocol !== "https:" ? "www.skypeassets.com" : "secure.skypeassets.com");
20 this.ui = l;
21 this.setImageAttributes = j;
22 this.trimString = o;
23 this.escapeString = b;
24 this.createDetectionFrame = h;
25 this.trySkypeUri_IE9_IE8 = n;
26 this.trySkypeUri_IOS_Safari = e;
27 this.trySkypeUri_Android_Chrome = a_androidchrome;
28 this.trySkypeUri_Android_Firefox = q;
29 this.trySkypeUri_Generic = a;
30 this.SkypeClientDownloadUrl = this.httpProtocol + "//www.skype.com/download";
31 this.installSkypeMsg = "Please install Skype application in order to make this call or send a message.";
32 this.displayNotSupportedMsg = f;
33 this.SkypeUriAssetMap = c;
34 this.SkypeUriAssetColorMap = g;
35 this.SkypeUriNameLinks = m;
36 this.assetPrefix = this.assetsDomain + "/i/scom/images/skype-buttons/";
37 this.assetSizeArray = [10, 12, 14, 16, 24, 32];
38 this.assetSizeDefault = 16;
39 this.assetMarginMinimum = 16;
40 this.assetSize = this.assetSizeDefault;
41 this.assetMargin = (this.assetSize >= this.assetMarginMinimum) ? this.assetSize : this.assetMarginMinimum;
42 this.assetColorPathWhite = "_trans_";
43 this.assetColorFontWhite = "white";
44 this.assetColorPathSkype = "_";
45 this.assetColorFontSkype = "#444444";
46 this.assetColorPathDefault = this.assetColorPathSkype;
47 this.assetColorFontDefault = this.assetColorFontSkype;
48 this.assetColor = new this.SkypeUriAssetColorMap(this.assetColorPathDefault, this.assetColorFontDefault);
49 this.assetSizeMap = {};
50 this.assetSizeMap.size10 = new this.SkypeUriAssetMap(10, -18);
51 this.assetSizeMap.size12 = new this.SkypeUriAssetMap(12, -19);
52 this.assetSizeMap.size14 = new this.SkypeUriAssetMap(14, -19);
53 this.assetSizeMap.size16 = new this.SkypeUriAssetMap(16, -20);
54 this.assetSizeMap.size24 = new this.SkypeUriAssetMap(24, -30);
55 this.assetSizeMap.size32 = new this.SkypeUriAssetMap(32, -41);
56 this.focusLinks = new this.SkypeUriNameLinks("", "");
57 this.callLinks = new this.SkypeUriNameLinks("call", "");
58 this.videoLinks = new this.SkypeUriNameLinks("call", "");
59 this.chatLinks = new this.SkypeUriNameLinks("chat", "");
60 this.multiChatLinks = new this.SkypeUriNameLinks("chat", "");
61 this.dropdownLinks = new this.SkypeUriNameLinks("dropdown", "");
62 this.setImageAttributes(this.assetSizeDefault, "");
63 this.analyzeSkypeUriInit = null;
64 this.analyzeSkypeUriAction = null;
65 this.analyzeSkypeUriRedirect = null;
66 this.analyzeSkypeUr = null;
67 this.analyzePreCrumbs = [];
68 this.analyzeCrumbs = [];
69 this.analyzeCrumbIndex = -1;
70 this.tryAnalyzeSkypeUri = k;
71 this.detectSkypeClientFrameId = null;
72 this.detectedPlatform = "unknown";
73 this.detectedBrowser = "unknown";
74 this.isWinXP = false;
75 this.isWinVista = false;
76 this.isWin7 = false;
77 this.isWin8 = false;
78 this.isOSX_SnowLeopard = false;
79 this.isOSX_MountainLion = false;
80 this.isLinux = false;
81 this.isWinPhone8 = false;
82 this.isAndroid = false;
83 this.isAndroid_Gingerbread = false;
84 this.isAndroid_IceCream = false;
85 this.isAndroid_JellyBean = false;
86 this.isIOS7 = false;
87 this.isIOS6 = false;
88 this.isIOS5 = false;
89 this.isIOS4 = false;
90 this.isIPhone = false;
91 this.isIPad = false;
92 this.isIPod = false;
93 this.isIE10 = false;
94 this.isIE9 = false;
95 this.isIE8 = false;
96 this.isIE7 = false;
97 this.isIE6 = false;
98 this.isFF = false;
99 this.isAndroidBrowser = false;
100 this.isChrome = false;
101 this.isSafari = false;
102 this.showDropdown = i;
103 this.hideDropdown = d;
104 this.analyzeScript = this.assetsDomain + "/i/scom/js/" + "skype-analytics.js";
105 this.includeJavascript = p;
106 this.includeJavascript(this.analyzeScript);
107 if (navigator.userAgent.indexOf("Windows NT 5.1") !== -1) {
108 this.isWinXP = true;
109 this.detectedPlatform = "Windows XP"
110 } else {
111 if (navigator.userAgent.indexOf("Windows NT 6.0") !== -1) {
112 this.isWinVista = true;
113 this.detectedPlatform = "Windows Vista"
114 } else {
115 if (navigator.userAgent.indexOf("Windows NT 6.1") !== -1) {
116 this.isWin7 = true;
117 this.detectedPlatform = "Windows 7"
118 } else {
119 if (navigator.userAgent.indexOf("Windows NT 6.2") !== -1) {
120 this.isWin8 = true;
121 this.detectedPlatform = "Windows 8"
122 } else {
123 if (navigator.userAgent.indexOf("Mac OS X 10_7") !== -1) {
124 this.isOSX_SnowLeopard = true;
125 this.detectedPlatform = "OSX 10.7"
126 } else {
127 if (navigator.userAgent.indexOf("Mac OS X 10.8") !== -1) {
128 this.isOSX_MountainLion = true;
129 this.detectedPlatform = "OSX 10.8"
130 } else {
131 if (navigator.userAgent.indexOf("Mac OS X 10_8") !== -1) {
132 this.isOSX_MountainLion = true;
133 this.detectedPlatform = "OSX 10.8"
134 } else {
135 if(navigator.userAgent.indexOf("Android") !== -1) {
136 this.isAndroid = true;
137 this.detectedPlatform = "Android"
138
139 if (navigator.userAgent.indexOf("Android 2.3") !== -1) {
140 this.isAndroid_Gingerbread = true;
141 this.detectedPlatform = "Android 2.3"
142 }
143 else if(navigator.userAgent.indexOf("Android 4.0") !== -1) {
144 this.isAndroid_IceCream = true;
145 this.detectedPlatform = "Android 4.0"
146 }
147 else if(navigator.userAgent.indexOf("Android 4.1") !== -1) {
148 this.isAndroid_JellyBean = true;
149 this.detectedPlatform = "Android 4.1"
150 }
151 }
152 else if (navigator.userAgent.indexOf("Linux") !== -1) {
153 this.isLinux = true;
154 this.detectedPlatform = "Linux"
155 } else {
156 if (navigator.userAgent.indexOf("Windows Phone 8") !== -1) {
157 this.isWinPhone8 = true;
158 this.detectedPlatform = "Windows Phone 8"
159 } else {
160 if (navigator.userAgent.match(/OS 7_[0-9_]+ like Mac OS X/i)) {
161 this.isIOS7 = true;
162 this.detectedPlatform = "iOS7"
163 } else {
164 if (navigator.userAgent.match(/OS 6_[0-9_]+ like Mac OS X/i)) {
165 this.isIOS6 = true;
166 this.detectedPlatform = "iOS6"
167 } else {
168 if (navigator.userAgent.match(/OS 5_[0-9_]+ like Mac OS X/i)) {
169 this.isIOS5 = true;
170 this.detectedPlatform = "iOS5"
171 } else {
172 if (navigator.userAgent.match(/OS 4_[0-9_]+ like Mac OS X/i)) {
173 this.isIOS4 = true;
174 this.detectedPlatform = "iOS4"
175 }
176 }
177 }
178 }
179 }
180 }
181 }
182 }
183 }
184 }
185 }
186 }
187 } if (navigator.userAgent.indexOf("iPhone") !== -1) {
188 this.isIPhone = true;
189 this.detectedPlatform = "iPhone " + this.detectedPlatform
190 } else {
191 if (navigator.userAgent.indexOf("iPad") !== -1) {
192 this.IsPad = true;
193 this.detectedPlatform = "iPad " + this.detectedPlatform
194 } else {
195 if (navigator.userAgent.indexOf("iPod") !== -1) {
196 this.IsPod = true;
197 this.detectedPlatform = "iPod " + this.detectedPlatform
198 }
199 }
200 } if (navigator.userAgent.indexOf("MSIE 10") !== -1) {
201 this.isIE10 = true;
202 this.detectedBrowser = "Internet Explorer 10"
203 } else {
204 if (navigator.userAgent.indexOf("MSIE 9") !== -1) {
205 this.isIE9 = true;
206 this.detectedBrowser = "Internet Explorer 9"
207 } else {
208 if (navigator.userAgent.indexOf("MSIE 8") !== -1) {
209 this.isIE8 = true;
210 this.detectedBrowser = "Internet Explorer 8"
211 } else {
212 if (navigator.userAgent.indexOf("MSIE 7") !== -1) {
213 this.isIE7 = true;
214 this.detectedBrowser = "Internet Explorer 7"
215 } else {
216 if (navigator.userAgent.indexOf("MSIE 6") !== -1) {
217 this.isIE6 = true;
218 this.detectedBrowser = "Internet Explorer 6"
219 } else {
220 if (navigator.userAgent.indexOf("Firefox") !== -1) {
221 this.isFF = true;
222 this.detectedBrowser = "Firefox"
223 } else {
224 if (navigator.userAgent.indexOf("Chrome") !== -1) {
225 this.isChrome = true;
226 this.detectedBrowser = "Chrome"
227 } else {
228 if (navigator.userAgent.indexOf("Mobile Safari") !== -1 && this.isAndroid) {
229 this.isAndroidBrowser = true;
230 this.detectedBrowser = "Mobile Safari"
231 } else {
232 if (navigator.userAgent.indexOf("Safari") !== -1) {
233 this.isSafari = true;
234 this.detectedBrowser = "Safari"
235 }
236 }
237 }
238 }
239 }
240 }
241 }
242 }
243 } if (this.isLinux) {
244 this.useDetection = "false"
245 }
246 if (this.isAndroid) {
247 this.SkypeClientDownloadUrl = "market://details?id=com.skype.raider";
248 } else {
249 if (this.isIPhone || this.IsPod) {
250 this.SkypeClientDownloadUrl = "http://appstore.com/skypeforiphone";
251 } else {
252 if (this.IsPad) {
253 this.SkypeClientDownloadUrl = "http://appstore.com/skypeforipad";
254 }
255 }
256 }
257
258 function f() {
259 alert("Sorry this device doesn't support Skype Buttons yet. Please add " + this.participants[0] + " as a contact in your Skype Client to MAKE this call.")
260 }
261
262 function i(r) {
263 document.getElementById(r).style.display = "block";
264 if (typeof (window["timer_" + r]) !== "undefined") {
265 window.clearTimeout(window["timer_" + r])
266 }
267 window["timer_" + r] = null;
268 delete window["timer_" + r]
269 }
270
271 function d(r) {
272 window["timer_" + r] = window.setTimeout(function () {
273 document.getElementById(r).style.display = "none"
274 }, 1000)
275 }
276
277 function k(r, s) {
278 if (!this.analyzeSkypeUri && typeof analyzeSkypeUri === "function") {
279 this.analyzeSkypeUri = analyzeSkypeUri
280 }
281 if (typeof this.analyzeSkypeUri === "function") {
282 this.analyzeSkypeUri(r, s)
283 } else {
284 var t = {};
285 t.prop3 = "image size / color: " + this.imageSize + " / " + this.imageColor;
286 t.prop4 = "video / list participants / list topic: " + this.video + " / " + this.listParticipants + " / " + this.listTopic;
287 t.prop5 = "target(s): " + this.participants;
288 t.prop6 = "user agent: " + navigator.userAgent;
289 t.prop7 = "detected protocol: " + window.location.protocol;
290 t.prop8 = "detected platform: " + this.detectedPlatform;
291 t.prop9 = "detected browser: " + this.detectedBrowser;
292 t.prop10 = this.version + " (pre script load)";
293 if (r === "init") {
294 if (this.name === this.chatLinks.name) {
295 t.prop11 = "Chat Init"
296 } else {
297 if (this.name === this.callLinks.name) {
298 t.prop11 = "Call Init"
299 } else {
300 if (this.name === this.dropdownLinks.name) {
301 t.prop11 = "Dropdown Init"
302 }
303 }
304 }
305 t.prop12 = document.domain + " - Init"
306 } else {
307 if (r === "chat") {
308 t.prop11 = "Chat Action";
309 t.prop13 = document.domain + " - Chat"
310 } else {
311 if (r === "call") {
312 t.prop11 = "Call Action";
313 t.prop14 = document.domain + " - Call"
314 } else {
315 if (r === "dropdownChat") {
316 t.prop11 = "Dropdown Chat Action";
317 t.prop13 = document.domain + " - Chat"
318 } else {
319 if (r === "dropdownCall") {
320 t.prop11 = "Dropdown Call Action";
321 t.prop14 = document.domain + " - Call"
322 } else {
323 if (r === "redirect") {
324 t.prop11 = "Redirect"
325 }
326 }
327 }
328 }
329 }
330 }
331 this.analyzePreCrumbs.push(t)
332 }
333 }
334
335 function p(s) {
336 var r = document.getElementsByTagName("head")[0];
337 var t = document.createElement("script");
338 t.setAttribute("type", "text/javascript");
339 t.setAttribute("src", s);
340 r.appendChild(t)
341 }
342
343 function c(s, r) {
344 this.size = s;
345 this.verticalOffset = r
346 }
347
348 function g(s, r) {
349 this.path = s;
350 this.font = r
351 }
352
353 function m(r, s) {
354 this.name = r;
355 this.linkImage = s
356 }
357
358 function l(L) {
359 this.name = null;
360 if ((L.name !== undefined) && (L.name !== null)) {
361 this.name = L.name
362 }
363 if ((L.element !== undefined) && (L.element !== null)) {
364 this.element = L.element
365 }
366 if ((L.participants !== undefined) && (L.participants !== null)) {
367 this.participants = L.participants
368 }
369 if ((L.listParticipants !== undefined) && (L.listParticipants !== null)) {
370 this.listParticipants = L.listParticipants
371 }
372 if ((L.video !== undefined) && (L.video !== null)) {
373 this.video = L.video
374 }
375 if ((L.topic !== undefined) && (L.topic !== null)) {
376 this.topic = L.topic
377 }
378 if ((L.listTopic !== undefined) && (L.listTopic !== null)) {
379 this.listTopic = L.listTopic
380 }
381 if ((L.imageSize !== undefined) && (L.imageSize !== null)) {
382 this.imageSize = L.imageSize
383 }
384 if ((L.imageColor !== undefined) && (L.imageColor !== null)) {
385 this.imageColor = L.imageColor
386 }
387 if ((L.useDetection !== undefined) && (L.useDetection !== null)) {
388 this.useDetection = L.useDetection
389 }
390 if (this.useDetection === "false") {
391 this.useDetection = false
392 } else {
393 if (this.useDetection === "true") {
394 this.useDetection = true
395 }
396 } if ((L.protocol !== undefined) && (L.protocol !== null)) {
397 this.protocol = L.protocol
398 } else {
399 this.protocol = "skype:"
400 }
401 var G = {};
402 G.prop0 = this.name;
403 G.prop3 = "image size / color: " + this.imageSize + " / " + this.imageColor;
404 G.prop4 = "video / list participants / list topic: " + this.video + " / " + this.listParticipants + " / " + this.listTopic;
405 G.prop5 = "target(s): " + this.participants;
406 G.prop6 = "user agent: " + navigator.userAgent;
407 G.prop7 = "detected protocol: " + window.location.protocol;
408 G.prop8 = "detected platform: " + this.detectedPlatform;
409 G.prop9 = "detected browser: " + this.detectedBrowser;
410 G.prop10 = this.version;
411 this.analyzeCrumbs.push(G);
412 this.analyzeCrumbIndex += 1;
413 var y;
414 var P;
415 y = this.trimString(L.element);
416 if (y.length !== 0) {
417 P = document.getElementById(y);
418 if (P === null) {
419 alert("Sorry! Could not find Skype URI parent element: " + y + " ('" + L.element + "')");
420 return (false)
421 } else {
422 if (((L.name !== undefined) && (L.name !== null)) && ((L.participants === undefined) || (L.participants === null))) {
423 alert("Error! Required member 'participants' omitted or specified as null");
424 return (false)
425 }
426 }
427 } else {
428 alert("Error! Required member 'element' (Skype URI parent element) omitted or specified as null");
429 return (false)
430 }
431 this.setImageAttributes(L.imageSize, this.trimString(L.imageColor));
432 if ((L.protocol !== undefined) && (L.protocol !== null)) {
433 this.protocol = L.protocol
434 }
435 var B = this.protocol;
436 var C = "";
437 var x = 0;
438 var u = false;
439 if ((L.participants !== undefined) && (L.participants !== null)) {
440 while (x < L.participants.length) {
441 if (L.participants[x] !== null) {
442 y = this.trimString(L.participants[x]);
443 if (y.length !== 0) {
444 if (x !== 0) {
445 B += ";";
446 C += ", ";
447 u = true
448 }
449 B += y;
450 C += y
451 }
452 }
453 x++
454 }
455 }
456 var H = this.focusLinks.name;
457 var w = this.focusLinks.linkImage;
458 var M = this.focusLinks.linkImageAltTag;
459 var F = this.focusLinks.role;
460 var D = false;
461 y = this.trimString(L.name);
462 if (y.length !== 0) {
463 H = y;
464 if (H === this.callLinks.name) {
465 D = true;
466 w = this.callLinks.linkImage;
467 M = this.callLinks.linkImageAltTag;
468 F = this.callLinks.role
469 } else {
470 if (H === this.chatLinks.name) {
471 if (u) {
472 w = this.multiChatLinks.linkImage;
473 M = this.multiChatLinks.linkImageAltTag;
474 F = this.multiChatLinks.role
475 } else {
476 w = this.chatLinks.linkImage;
477 M = this.chatLinks.linkImageAltTag;
478 F = this.chatLinks.role
479 }
480 } else {
481 if (H === this.dropdownLinks.name) {
482 w = this.dropdownLinks.linkImage;
483 M = this.dropdownLinks.linkImageAltTag;
484 F = this.dropdownLinks.role
485 } else {
486 alert("Unrecognized Skype URI name: " + H + " ('" + L.name + "') -- " + this.callLinks.name + "/" + this.chatLinks.name);
487 return (false)
488 }
489 }
490 }
491 B += "?" + H
492 } else {
493 if (C.length > 0) {
494 w = this.callLinks.linkImage;
495 M = this.callLinks.linkImageAltTag;
496 F = this.callLinks.role
497 }
498 } if (D) {
499 y = this.trimString(L.video);
500 if (y === "true") {
501 w = this.videoLinks.linkImage;
502 M = this.videoLinks.linkImageAltTag;
503 F = this.videoLinks.role;
504 B += "&video=" + y
505 }
506 }
507 var s = null;
508 if ((u) && ((D) || (H === this.chatLinks.name))) {
509 y = this.trimString(L.topic);
510 if (y.length > 0) {
511 s = y;
512 B += "&topic=" + b(s)
513 }
514 }
515 var N = document.createElement("a");
516 var v = "";
517 var A = "";
518 if (!this.useDetection || (this.isWin8 && this.isIE10) || this.isIE7 || this.isIE6) {
519 A = B
520 } else {
521 if ((this.isWinPhone8 && this.isIE10) || (this.isAndroid && this.isAndroidBrowser)) {
522 A = "javascript://";
523 v += " Skype.displayNotSupportedMsg();"
524 }
525 else if(this.isAndroid && this.isChrome)
526 {
527 v = "Skype.trySkypeUri_Android_Chrome('" + this.analyzeCrumbIndex + "');";
528 A = B
529 }
530 else {
531 y = "Skype.trySkypeUri_Generic";
532 if (this.isIE10 || this.isIE9 || this.isIE8) {
533 y = "Skype.trySkypeUri_IE9_IE8"
534 } else {
535 // Note: iOS8 handles Skype.trySkypeUri_Generic so no need to switch to Skype.trySkypeUri_IOS_Safari
536 if ((this.isIOS7 || this.isIOS6 || this.isIOS5 || this.isIOS4) && this.isSafari) {
537 y = "Skype.trySkypeUri_IOS_Safari"
538 } else {
539 if (this.isAndroid && this.isFF) {
540 y = "Skype.trySkypeUri_Android_Firefox"
541 }
542 }
543 } if (this.detectSkypeClientFrameId === null) {
544 this.createDetectionFrame(P);
545 }
546 A = "javascript://";
547 v += y + "('" + B + "', '" + this.detectSkypeClientFrameId + "', '" + this.analyzeCrumbIndex + "'); return false;"
548 }
549 }
550 var z = document.createElement("img");
551 z.setAttribute("src", w);
552 z.setAttribute("alt", M);
553 z.setAttribute("role", F);
554 z.setAttribute("style", ("border:0; margin:" + this.assetMargin + "px; vertical-align:" + this.assetSizeMap[("size" + this.assetSize)].verticalOffset + "px;"));
555 if (this.name === this.dropdownLinks.name) {
556 z.setAttribute("onmouseover", "Skype.showDropdown('dropdown_" + this.element + "'); return false;");
557 z.setAttribute("onmouseout", "Skype.hideDropdown('dropdown_" + this.element + "'); return false;");
558 N.setAttribute("style", "cursor: text;");
559 N.setAttribute("onfocus", "Skype.showDropdown('dropdown_" + this.element + "'); return false;");
560 N.setAttribute("onblur", "Skype.hideDropdown('dropdown_" + this.element + "'); return false;");
561 N.setAttribute("href", "javascript://");
562 N.setAttribute("onclick", "return false;")
563 } else {
564 if (this.name === this.chatLinks.name) {
565 v = "Skype.tryAnalyzeSkypeUri('chat', '" + this.analyzeCrumbIndex + "');" + v
566 } else {
567 v = "Skype.tryAnalyzeSkypeUri('call', '" + this.analyzeCrumbIndex + "');" + v
568 }
569 N.setAttribute("href", A);
570 N.setAttribute("onclick", v)
571 }
572 N.appendChild(z);
573 uriPara = document.createElement("p");
574 uriPara.setAttribute("id", (L.element + "_paraElement"));
575 uriPara.setAttribute("style", ("font-size:" + (this.assetSize - 2) + "px; color:" + this.assetColor.font));
576 uriPara.appendChild(N);
577 if (this.name === this.dropdownLinks.name) {
578 var O = "-10";
579 var J = "15";
580 if (this.assetSize === "10") {
581 J = "15"
582 } else {
583 if (this.assetSize === "12") {
584 J = "15"
585 } else {
586 if (this.assetSize === "14") {
587 J = "15"
588 } else {
589 if (this.assetSize === "16") {
590 J = "15"
591 } else {
592 if (this.assetSize === "24") {
593 O = "-20";
594 J = "25"
595 } else {
596 if (this.assetSize === "32") {
597 O = "-30";
598 J = "30"
599 }
600 }
601 }
602 }
603 }
604 }
605 var r = document.createElement("ul");
606 r.id = "dropdown_" + this.element;
607 r.setAttribute("style", "display: none; position: absolute; margin-top: " + O + "px; margin-left: " + J + "px; width: 200px; padding-left: 20px; padding-right: 20px; border: 2px solid #00AFF0; background-color: white; color: #00AFF0; line-height: 50px; list-style: none; list-style-type: none;");
608 r.setAttribute("onmouseover", "Skype.showDropdown('dropdown_" + this.element + "'); return false;");
609 r.setAttribute("onmouseout", "Skype.hideDropdown('dropdown_" + this.element + "'); return false;");
610 var t = document.createElement("li");
611 t.setAttribute("style", "list-style: none; list-style-type: none;");
612 var Q = document.createElement("li");
613 Q.setAttribute("style", "list-style: none; list-style-type: none;");
614 var K = "";
615 var I = document.createElement("a");
616 I.href = "javascript://";
617 I.setAttribute("style", "text-decoration: none; color: #00AFF0; font-size: 16px;");
618 I.setAttribute("href", A);
619 K = "Skype.tryAnalyzeSkypeUri('dropdownCall', '" + this.analyzeCrumbIndex + "');" + v;
620 I.setAttribute("onclick", K.replace("?" + this.dropdownLinks.name, "?" + this.callLinks.name));
621 I.setAttribute("onmouseover", "this.style.textDecoration = 'underline'");
622 I.setAttribute("onmouseout", "this.style.textDecoration = 'none'");
623 I.setAttribute("role", "Menu item");
624 I.setAttribute("onfocus", "Skype.showDropdown('dropdown_" + this.element + "'); return false;");
625 I.setAttribute("onblur", "Skype.hideDropdown('dropdown_" + this.element + "'); return false;");
626 var E = document.createElement("a");
627 E.href = "javascript://";
628 E.setAttribute("style", "text-decoration: none; color: #00AFF0; font-size: 16px;");
629 E.setAttribute("href", A);
630 K = "Skype.tryAnalyzeSkypeUri('dropdownChat', '" + this.analyzeCrumbIndex + "');" + v;
631 E.setAttribute("onclick", K.replace("?" + this.dropdownLinks.name, "?" + this.chatLinks.name));
632 E.setAttribute("onmouseover", "this.style.textDecoration = 'underline'");
633 E.setAttribute("onmouseout", "this.style.textDecoration = 'none'");
634 I.setAttribute("role", "Menu item");
635 E.setAttribute("onfocus", "Skype.showDropdown('dropdown_" + this.element + "'); return false;");
636 E.setAttribute("onblur", "Skype.hideDropdown('dropdown_" + this.element + "'); return false;");
637 I.innerHTML = "Call";
638 t.appendChild(I);
639 E.innerHTML = "Chat";
640 Q.appendChild(E);
641 r.appendChild(t);
642 r.appendChild(Q);
643 uriPara.appendChild(r)
644 }
645 y = null;
646 if (C.length !== 0) {
647 if (this.trimString(L.listParticipants) === "true") {
648 y = " " + C
649 }
650 if ((s !== null) && (this.trimString(L.listTopic) === "true")) {
651 if ((y === null) || (y.length === 0)) {
652 y = " RE: " + s
653 } else {
654 y += ("; RE: " + s)
655 }
656 }
657 if (y === null) {
658 y = ""
659 }
660 uriPara.appendChild(document.createTextNode(y))
661 }
662 P.appendChild(uriPara);
663 this.tryAnalyzeSkypeUri("init", this.analyzeCrumbIndex);
664 return (true)
665 }
666
667 function j(u, r) {
668 this.assetSize = this.assetSizeDefault;
669 this.assetMargin = (this.assetSize >= this.assetMarginMinimum) ? this.assetSize : this.assetMarginMinimum;
670 var t;
671 var s = this.assetSizeArray.length;
672 for (t = 0; t < s; t++) {
673 if (u === this.assetSizeArray[t]) {
674 this.assetSize = u;
675 break
676 }
677 }
678 this.assetMargin = (this.assetSize >= this.assetMarginMinimum) ? this.assetSize : this.assetMarginMinimum;
679 this.assetColor.path = this.assetColorPathDefault;
680 this.assetColor.font = this.assetColorFontDefault;
681 if (r.length > 0) {
682 if (r === "skype") {
683 this.assetColor.path = this.assetColorPathSkype;
684 this.assetColor.font = this.assetColorFontSkype
685 } else {
686 if (r === "white") {
687 this.assetColor.path = this.assetColorPathWhite;
688 this.assetColor.font = this.assetColorFontWhite
689 }
690 }
691 }
692 this.focusLinks.linkImage = this.assetPrefix + "Skypeicon" + this.assetColor.path + this.assetSize + "px.png";
693 this.callLinks.linkImage = this.assetPrefix + "callbutton" + this.assetColor.path + this.assetSize + "px.png";
694 this.videoLinks.linkImage = this.assetPrefix + "callbutton" + this.assetColor.path + this.assetSize + "px.png";
695 this.chatLinks.linkImage = this.assetPrefix + "chatbutton" + this.assetColor.path + this.assetSize + "px.png";
696 this.multiChatLinks.linkImage = this.assetPrefix + "chatbutton" + this.assetColor.path + this.assetSize + "px.png";
697 this.dropdownLinks.linkImage = this.assetPrefix + "dropdowncallbutton" + this.assetColor.path + this.assetSize + "px.png";
698 this.focusLinks.linkImageAltTag = "Open Skype";
699 this.callLinks.linkImageAltTag = "Skype call";
700 this.videoLinks.linkImageAltTag = "Skype call";
701 this.chatLinks.linkImageAltTag = "Skype chat, instant message";
702 this.multiChatLinks.linkImageAltTag = "Skype chat, instant message";
703 this.dropdownLinks.linkImageAltTag = "Call options";
704 this.focusLinks.role = "Button";
705 this.callLinks.role = "Button";
706 this.videoLinks.role = "Button";
707 this.chatLinks.role = "Button";
708 this.multiChatLinks.role = "Button";
709 this.dropdownLinks.role = "Pop up menu"
710 }
711
712 function o(t) {
713 if ((t === undefined) || (t === null)) {
714 return ("")
715 }
716 var u = t.length;
717 var s = u - 1;
718 var r = false;
719 while ((!r) && (u > 0)) {
720 switch (t[s]) {
721 case " ":
722 case "\t":
723 case "\n":
724 case "\r":
725 u--;
726 break;
727 default:
728 r = true;
729 break
730 }
731 s--
732 }
733 if (u > 0) {
734 return (t.substr(0, u))
735 }
736 return ("")
737 }
738
739 function b(s) {
740 if ((s === undefined) || (s === null)) {
741 return ("")
742 }
743 var r = s.replace(/\s/g, "%20");
744 r = r.replace(/:/g, "%3A");
745 r = r.replace(/\x2F/g, "%2F");
746 return (r.replace(/\x5C/g, "%5C"))
747 }
748
749 function h(r) {
750 if(!r) {
751 var divs = document.getElementsByTagName("div");
752 for(var i = 0; i < divs.length; i++) {
753 if(divs[i].id && divs[i].id.match("SkypeButton")) {
754 r = divs[i];
755 }
756 }
757 }
758 var t = new Date();
759 this.detectSkypeClientFrameId = "_detectSkypeClient_" + t.getTime().toString();
760 var s = document.createElement("iframe");
761 s.setAttribute("style", "display:none;");
762 s.setAttribute("id", this.detectSkypeClientFrameId);
763 r.appendChild(s);
764 }
765
766 function n(s, w, u) {
767 var v = false;
768 var r = window.open("", "_blank", "width=100, height=100");
769 var t = r.document.createElement("iframe");
770 t.setAttribute("src", s);
771 r.document.body.appendChild(t);
772 setTimeout(function () {
773 try {
774 r.location.href;
775 v = true
776 } catch (x) {}
777 if (v) {
778 r.setTimeout("window.close()", 10)
779 } else {
780 r.close();
781 alert(Skype.installSkypeMsg);
782 Skype.tryAnalyzeSkypeUri("redirect", u);
783 window.location = Skype.SkypeClientDownloadUrl
784 }
785 }, 100)
786 }
787
788 function e(s, v, t) {
789 var r = document.getElementById(v);
790 var u = true;
791 window.addEventListener("pagehide", function () {
792 u = false
793 }, false);
794 if (r !== null) {
795 r.src = s
796 }
797 setTimeout(function () {
798 if (u) {
799 alert(Skype.installSkypeMsg);
800 Skype.tryAnalyzeSkypeUri("redirect", t);
801 window.location = Skype.SkypeClientDownloadUrl
802 }
803 }, 2000)
804 }
805
806 function q(s, v, u) {
807 var t = false;
808 var r = document.getElementById(v);
809 if (r !== null) {
810 try {
811 r.contentWindow.location.href = s;
812 t = true
813 } catch (w) {
814 t = false
815 }
816 }
817 setTimeout(function () {
818 if (!t) {
819 alert(Skype.installSkypeMsg);
820 Skype.tryAnalyzeSkypeUri("redirect", u);
821 window.location = Skype.SkypeClientDownloadUrl
822 }
823 }, 2000)
824 }
825
826 function a(s, v, t) {
827 var u = true;
828 window.onblur = function () {
829 u = false;
830 };
831 var r = document.getElementById(v);
832 if (r !== null) {
833 r.src = s
834 }
835 setTimeout(function () {
836 if (u) {
837 alert(Skype.installSkypeMsg);
838 Skype.tryAnalyzeSkypeUri("redirect", t);
839 window.location = Skype.SkypeClientDownloadUrl
840 }
841 }, 2000)
842 }
843
844 function a_androidchrome(analyzeCrumbIndex) {
845 var documentVisible = true;
846 var vizchangecb;
847
848 document.addEventListener("visibilitychange", vizchangecb = function () {
849 documentVisible = !document.hidden;
850 });
851
852 setTimeout(function () {
853
854 if (documentVisible) {
855 alert(Skype.installSkypeMsg);
856 Skype.tryAnalyzeSkypeUri("redirect", analyzeCrumbIndex);
857 window.location = Skype.SkypeClientDownloadUrl
858 }
859
860 document.removeEventListener("visibilitychange", vizchangecb);
861 }, 6000) // if Skype app is booting the Skype splash screen prevents the visibilitychange event firing
862 // until it is done, so we allow for a longer timeout in case we have to wait for it
863 }
864 }();
865
866 /*jshint +W003:true */
867 /*jshint +W107:true */
868 /*jshint +W057:true *//*jshint -W003:true */
869 /*jshint -W107:true */
870 /*jshint -W057:true */
871
872 var Skype = new function () {
873 this.name = null;
874 this.element = null;
875 this.participants = ["echo123"];
876 this.listParticipants = "false";
877 this.video = "false";
878 this.topic = null;
879 this.listTopic = "false";
880 this.imageSize = null;
881 this.imageColor = null;
882 this.useDetection = "true";
883 this.protocol = "skype:";
884 this.version = "1.1.7";
885 this.httpProtocol = window.location.protocol !== "https:" ? "http:" : "https:";
886 this.assetsDomain = this.httpProtocol + "//" + (this.httpProtocol !== "https:" ? "www.skypeassets.com" : "secure.skypeassets.com");
887 this.ui = l;
888 this.setImageAttributes = j;
889 this.trimString = o;
890 this.escapeString = b;
891 this.createDetectionFrame = h;
892 this.trySkypeUri_IE9_IE8 = n;
893 this.trySkypeUri_IOS_Safari = e;
894 this.trySkypeUri_Android_Chrome = a_androidchrome;
895 this.trySkypeUri_Android_Firefox = q;
896 this.trySkypeUri_Generic = a;
897 this.SkypeClientDownloadUrl = this.httpProtocol + "//www.skype.com/download";
898 this.installSkypeMsg = "Please install Skype application in order to make this call or send a message.";
899 this.displayNotSupportedMsg = f;
900 this.SkypeUriAssetMap = c;
901 this.SkypeUriAssetColorMap = g;
902 this.SkypeUriNameLinks = m;
903 this.assetPrefix = this.assetsDomain + "/i/scom/images/skype-buttons/";
904 this.assetSizeArray = [10, 12, 14, 16, 24, 32];
905 this.assetSizeDefault = 16;
906 this.assetMarginMinimum = 16;
907 this.assetSize = this.assetSizeDefault;
908 this.assetMargin = (this.assetSize >= this.assetMarginMinimum) ? this.assetSize : this.assetMarginMinimum;
909 this.assetColorPathWhite = "_trans_";
910 this.assetColorFontWhite = "white";
911 this.assetColorPathSkype = "_";
912 this.assetColorFontSkype = "#444444";
913 this.assetColorPathDefault = this.assetColorPathSkype;
914 this.assetColorFontDefault = this.assetColorFontSkype;
915 this.assetColor = new this.SkypeUriAssetColorMap(this.assetColorPathDefault, this.assetColorFontDefault);
916 this.assetSizeMap = {};
917 this.assetSizeMap.size10 = new this.SkypeUriAssetMap(10, -18);
918 this.assetSizeMap.size12 = new this.SkypeUriAssetMap(12, -19);
919 this.assetSizeMap.size14 = new this.SkypeUriAssetMap(14, -19);
920 this.assetSizeMap.size16 = new this.SkypeUriAssetMap(16, -20);
921 this.assetSizeMap.size24 = new this.SkypeUriAssetMap(24, -30);
922 this.assetSizeMap.size32 = new this.SkypeUriAssetMap(32, -41);
923 this.focusLinks = new this.SkypeUriNameLinks("", "");
924 this.callLinks = new this.SkypeUriNameLinks("call", "");
925 this.videoLinks = new this.SkypeUriNameLinks("call", "");
926 this.chatLinks = new this.SkypeUriNameLinks("chat", "");
927 this.multiChatLinks = new this.SkypeUriNameLinks("chat", "");
928 this.dropdownLinks = new this.SkypeUriNameLinks("dropdown", "");
929 this.setImageAttributes(this.assetSizeDefault, "");
930 this.analyzeSkypeUriInit = null;
931 this.analyzeSkypeUriAction = null;
932 this.analyzeSkypeUriRedirect = null;
933 this.analyzeSkypeUr = null;
934 this.analyzePreCrumbs = [];
935 this.analyzeCrumbs = [];
936 this.analyzeCrumbIndex = -1;
937 this.tryAnalyzeSkypeUri = k;
938 this.detectSkypeClientFrameId = null;
939 this.detectedPlatform = "unknown";
940 this.detectedBrowser = "unknown";
941 this.isWinXP = false;
942 this.isWinVista = false;
943 this.isWin7 = false;
944 this.isWin8 = false;
945 this.isOSX_SnowLeopard = false;
946 this.isOSX_MountainLion = false;
947 this.isLinux = false;
948 this.isWinPhone8 = false;
949 this.isAndroid = false;
950 this.isAndroid_Gingerbread = false;
951 this.isAndroid_IceCream = false;
952 this.isAndroid_JellyBean = false;
953 this.isIOS7 = false;
954 this.isIOS6 = false;
955 this.isIOS5 = false;
956 this.isIOS4 = false;
957 this.isIPhone = false;
958 this.isIPad = false;
959 this.isIPod = false;
960 this.isIE10 = false;
961 this.isIE9 = false;
962 this.isIE8 = false;
963 this.isIE7 = false;
964 this.isIE6 = false;
965 this.isFF = false;
966 this.isAndroidBrowser = false;
967 this.isChrome = false;
968 this.isSafari = false;
969 this.showDropdown = i;
970 this.hideDropdown = d;
971 this.analyzeScript = this.assetsDomain + "/i/scom/js/" + "skype-analytics.js";
972 this.includeJavascript = p;
973 this.includeJavascript(this.analyzeScript);
974 if (navigator.userAgent.indexOf("Windows NT 5.1") !== -1) {
975 this.isWinXP = true;
976 this.detectedPlatform = "Windows XP"
977 } else {
978 if (navigator.userAgent.indexOf("Windows NT 6.0") !== -1) {
979 this.isWinVista = true;
980 this.detectedPlatform = "Windows Vista"
981 } else {
982 if (navigator.userAgent.indexOf("Windows NT 6.1") !== -1) {
983 this.isWin7 = true;
984 this.detectedPlatform = "Windows 7"
985 } else {
986 if (navigator.userAgent.indexOf("Windows NT 6.2") !== -1) {
987 this.isWin8 = true;
988 this.detectedPlatform = "Windows 8"
989 } else {
990 if (navigator.userAgent.indexOf("Mac OS X 10_7") !== -1) {
991 this.isOSX_SnowLeopard = true;
992 this.detectedPlatform = "OSX 10.7"
993 } else {
994 if (navigator.userAgent.indexOf("Mac OS X 10.8") !== -1) {
995 this.isOSX_MountainLion = true;
996 this.detectedPlatform = "OSX 10.8"
997 } else {
998 if (navigator.userAgent.indexOf("Mac OS X 10_8") !== -1) {
999 this.isOSX_MountainLion = true;
1000 this.detectedPlatform = "OSX 10.8"
1001 } else {
1002 if(navigator.userAgent.indexOf("Android") !== -1) {
1003 this.isAndroid = true;
1004 this.detectedPlatform = "Android"
1005
1006 if (navigator.userAgent.indexOf("Android 2.3") !== -1) {
1007 this.isAndroid_Gingerbread = true;
1008 this.detectedPlatform = "Android 2.3"
1009 }
1010 else if(navigator.userAgent.indexOf("Android 4.0") !== -1) {
1011 this.isAndroid_IceCream = true;
1012 this.detectedPlatform = "Android 4.0"
1013 }
1014 else if(navigator.userAgent.indexOf("Android 4.1") !== -1) {
1015 this.isAndroid_JellyBean = true;
1016 this.detectedPlatform = "Android 4.1"
1017 }
1018 }
1019 else if (navigator.userAgent.indexOf("Linux") !== -1) {
1020 this.isLinux = true;
1021 this.detectedPlatform = "Linux"
1022 } else {
1023 if (navigator.userAgent.indexOf("Windows Phone 8") !== -1) {
1024 this.isWinPhone8 = true;
1025 this.detectedPlatform = "Windows Phone 8"
1026 } else {
1027 if (navigator.userAgent.match(/OS 7_[0-9_]+ like Mac OS X/i)) {
1028 this.isIOS7 = true;
1029 this.detectedPlatform = "iOS7"
1030 } else {
1031 if (navigator.userAgent.match(/OS 6_[0-9_]+ like Mac OS X/i)) {
1032 this.isIOS6 = true;
1033 this.detectedPlatform = "iOS6"
1034 } else {
1035 if (navigator.userAgent.match(/OS 5_[0-9_]+ like Mac OS X/i)) {
1036 this.isIOS5 = true;
1037 this.detectedPlatform = "iOS5"
1038 } else {
1039 if (navigator.userAgent.match(/OS 4_[0-9_]+ like Mac OS X/i)) {
1040 this.isIOS4 = true;
1041 this.detectedPlatform = "iOS4"
1042 }
1043 }
1044 }
1045 }
1046 }
1047 }
1048 }
1049 }
1050 }
1051 }
1052 }
1053 }
1054 } if (navigator.userAgent.indexOf("iPhone") !== -1) {
1055 this.isIPhone = true;
1056 this.detectedPlatform = "iPhone " + this.detectedPlatform
1057 } else {
1058 if (navigator.userAgent.indexOf("iPad") !== -1) {
1059 this.IsPad = true;
1060 this.detectedPlatform = "iPad " + this.detectedPlatform
1061 } else {
1062 if (navigator.userAgent.indexOf("iPod") !== -1) {
1063 this.IsPod = true;
1064 this.detectedPlatform = "iPod " + this.detectedPlatform
1065 }
1066 }
1067 } if (navigator.userAgent.indexOf("MSIE 10") !== -1) {
1068 this.isIE10 = true;
1069 this.detectedBrowser = "Internet Explorer 10"
1070 } else {
1071 if (navigator.userAgent.indexOf("MSIE 9") !== -1) {
1072 this.isIE9 = true;
1073 this.detectedBrowser = "Internet Explorer 9"
1074 } else {
1075 if (navigator.userAgent.indexOf("MSIE 8") !== -1) {
1076 this.isIE8 = true;
1077 this.detectedBrowser = "Internet Explorer 8"
1078 } else {
1079 if (navigator.userAgent.indexOf("MSIE 7") !== -1) {
1080 this.isIE7 = true;
1081 this.detectedBrowser = "Internet Explorer 7"
1082 } else {
1083 if (navigator.userAgent.indexOf("MSIE 6") !== -1) {
1084 this.isIE6 = true;
1085 this.detectedBrowser = "Internet Explorer 6"
1086 } else {
1087 if (navigator.userAgent.indexOf("Firefox") !== -1) {
1088 this.isFF = true;
1089 this.detectedBrowser = "Firefox"
1090 } else {
1091 if (navigator.userAgent.indexOf("Chrome") !== -1) {
1092 this.isChrome = true;
1093 this.detectedBrowser = "Chrome"
1094 } else {
1095 if (navigator.userAgent.indexOf("Mobile Safari") !== -1 && this.isAndroid) {
1096 this.isAndroidBrowser = true;
1097 this.detectedBrowser = "Mobile Safari"
1098 } else {
1099 if (navigator.userAgent.indexOf("Safari") !== -1) {
1100 this.isSafari = true;
1101 this.detectedBrowser = "Safari"
1102 }
1103 }
1104 }
1105 }
1106 }
1107 }
1108 }
1109 }
1110 } if (this.isLinux) {
1111 this.useDetection = "false"
1112 }
1113 if (this.isAndroid) {
1114 this.SkypeClientDownloadUrl = "market://details?id=com.skype.raider";
1115 } else {
1116 if (this.isIPhone || this.IsPod) {
1117 this.SkypeClientDownloadUrl = "http://appstore.com/skypeforiphone";
1118 } else {
1119 if (this.IsPad) {
1120 this.SkypeClientDownloadUrl = "http://appstore.com/skypeforipad";
1121 }
1122 }
1123 }
1124
1125 function f() {
1126 alert("Sorry this device doesn't support Skype Buttons yet. Please add " + this.participants[0] + " as a contact in your Skype Client to MAKE this call.")
1127 }
1128
1129 function i(r) {
1130 document.getElementById(r).style.display = "block";
1131 if (typeof (window["timer_" + r]) !== "undefined") {
1132 window.clearTimeout(window["timer_" + r])
1133 }
1134 window["timer_" + r] = null;
1135 delete window["timer_" + r]
1136 }
1137
1138 function d(r) {
1139 window["timer_" + r] = window.setTimeout(function () {
1140 document.getElementById(r).style.display = "none"
1141 }, 1000)
1142 }
1143
1144 function k(r, s) {
1145 if (!this.analyzeSkypeUri && typeof analyzeSkypeUri === "function") {
1146 this.analyzeSkypeUri = analyzeSkypeUri
1147 }
1148 if (typeof this.analyzeSkypeUri === "function") {
1149 this.analyzeSkypeUri(r, s)
1150 } else {
1151 var t = {};
1152 t.prop3 = "image size / color: " + this.imageSize + " / " + this.imageColor;
1153 t.prop4 = "video / list participants / list topic: " + this.video + " / " + this.listParticipants + " / " + this.listTopic;
1154 t.prop5 = "target(s): " + this.participants;
1155 t.prop6 = "user agent: " + navigator.userAgent;
1156 t.prop7 = "detected protocol: " + window.location.protocol;
1157 t.prop8 = "detected platform: " + this.detectedPlatform;
1158 t.prop9 = "detected browser: " + this.detectedBrowser;
1159 t.prop10 = this.version + " (pre script load)";
1160 if (r === "init") {
1161 if (this.name === this.chatLinks.name) {
1162 t.prop11 = "Chat Init"
1163 } else {
1164 if (this.name === this.callLinks.name) {
1165 t.prop11 = "Call Init"
1166 } else {
1167 if (this.name === this.dropdownLinks.name) {
1168 t.prop11 = "Dropdown Init"
1169 }
1170 }
1171 }
1172 t.prop12 = document.domain + " - Init"
1173 } else {
1174 if (r === "chat") {
1175 t.prop11 = "Chat Action";
1176 t.prop13 = document.domain + " - Chat"
1177 } else {
1178 if (r === "call") {
1179 t.prop11 = "Call Action";
1180 t.prop14 = document.domain + " - Call"
1181 } else {
1182 if (r === "dropdownChat") {
1183 t.prop11 = "Dropdown Chat Action";
1184 t.prop13 = document.domain + " - Chat"
1185 } else {
1186 if (r === "dropdownCall") {
1187 t.prop11 = "Dropdown Call Action";
1188 t.prop14 = document.domain + " - Call"
1189 } else {
1190 if (r === "redirect") {
1191 t.prop11 = "Redirect"
1192 }
1193 }
1194 }
1195 }
1196 }
1197 }
1198 this.analyzePreCrumbs.push(t)
1199 }
1200 }
1201
1202 function p(s) {
1203 var r = document.getElementsByTagName("head")[0];
1204 var t = document.createElement("script");
1205 t.setAttribute("type", "text/javascript");
1206 t.setAttribute("src", s);
1207 r.appendChild(t)
1208 }
1209
1210 function c(s, r) {
1211 this.size = s;
1212 this.verticalOffset = r
1213 }
1214
1215 function g(s, r) {
1216 this.path = s;
1217 this.font = r
1218 }
1219
1220 function m(r, s) {
1221 this.name = r;
1222 this.linkImage = s
1223 }
1224
1225 function l(L) {
1226 this.name = null;
1227 if ((L.name !== undefined) && (L.name !== null)) {
1228 this.name = L.name
1229 }
1230 if ((L.element !== undefined) && (L.element !== null)) {
1231 this.element = L.element
1232 }
1233 if ((L.participants !== undefined) && (L.participants !== null)) {
1234 this.participants = L.participants
1235 }
1236 if ((L.listParticipants !== undefined) && (L.listParticipants !== null)) {
1237 this.listParticipants = L.listParticipants
1238 }
1239 if ((L.video !== undefined) && (L.video !== null)) {
1240 this.video = L.video
1241 }
1242 if ((L.topic !== undefined) && (L.topic !== null)) {
1243 this.topic = L.topic
1244 }
1245 if ((L.listTopic !== undefined) && (L.listTopic !== null)) {
1246 this.listTopic = L.listTopic
1247 }
1248 if ((L.imageSize !== undefined) && (L.imageSize !== null)) {
1249 this.imageSize = L.imageSize
1250 }
1251 if ((L.imageColor !== undefined) && (L.imageColor !== null)) {
1252 this.imageColor = L.imageColor
1253 }
1254 if ((L.useDetection !== undefined) && (L.useDetection !== null)) {
1255 this.useDetection = L.useDetection
1256 }
1257 if (this.useDetection === "false") {
1258 this.useDetection = false
1259 } else {
1260 if (this.useDetection === "true") {
1261 this.useDetection = true
1262 }
1263 } if ((L.protocol !== undefined) && (L.protocol !== null)) {
1264 this.protocol = L.protocol
1265 } else {
1266 this.protocol = "skype:"
1267 }
1268 var G = {};
1269 G.prop0 = this.name;
1270 G.prop3 = "image size / color: " + this.imageSize + " / " + this.imageColor;
1271 G.prop4 = "video / list participants / list topic: " + this.video + " / " + this.listParticipants + " / " + this.listTopic;
1272 G.prop5 = "target(s): " + this.participants;
1273 G.prop6 = "user agent: " + navigator.userAgent;
1274 G.prop7 = "detected protocol: " + window.location.protocol;
1275 G.prop8 = "detected platform: " + this.detectedPlatform;
1276 G.prop9 = "detected browser: " + this.detectedBrowser;
1277 G.prop10 = this.version;
1278 this.analyzeCrumbs.push(G);
1279 this.analyzeCrumbIndex += 1;
1280 var y;
1281 var P;
1282 y = this.trimString(L.element);
1283 if (y.length !== 0) {
1284 P = document.getElementById(y);
1285 if (P === null) {
1286 alert("Sorry! Could not find Skype URI parent element: " + y + " ('" + L.element + "')");
1287 return (false)
1288 } else {
1289 if (((L.name !== undefined) && (L.name !== null)) && ((L.participants === undefined) || (L.participants === null))) {
1290 alert("Error! Required member 'participants' omitted or specified as null");
1291 return (false)
1292 }
1293 }
1294 } else {
1295 alert("Error! Required member 'element' (Skype URI parent element) omitted or specified as null");
1296 return (false)
1297 }
1298 this.setImageAttributes(L.imageSize, this.trimString(L.imageColor));
1299 if ((L.protocol !== undefined) && (L.protocol !== null)) {
1300 this.protocol = L.protocol
1301 }
1302 var B = this.protocol;
1303 var C = "";
1304 var x = 0;
1305 var u = false;
1306 if ((L.participants !== undefined) && (L.participants !== null)) {
1307 while (x < L.participants.length) {
1308 if (L.participants[x] !== null) {
1309 y = this.trimString(L.participants[x]);
1310 if (y.length !== 0) {
1311 if (x !== 0) {
1312 B += ";";
1313 C += ", ";
1314 u = true
1315 }
1316 B += y;
1317 C += y
1318 }
1319 }
1320 x++
1321 }
1322 }
1323 var H = this.focusLinks.name;
1324 var w = this.focusLinks.linkImage;
1325 var M = this.focusLinks.linkImageAltTag;
1326 var F = this.focusLinks.role;
1327 var D = false;
1328 y = this.trimString(L.name);
1329 if (y.length !== 0) {
1330 H = y;
1331 if (H === this.callLinks.name) {
1332 D = true;
1333 w = this.callLinks.linkImage;
1334 M = this.callLinks.linkImageAltTag;
1335 F = this.callLinks.role
1336 } else {
1337 if (H === this.chatLinks.name) {
1338 if (u) {
1339 w = this.multiChatLinks.linkImage;
1340 M = this.multiChatLinks.linkImageAltTag;
1341 F = this.multiChatLinks.role
1342 } else {
1343 w = this.chatLinks.linkImage;
1344 M = this.chatLinks.linkImageAltTag;
1345 F = this.chatLinks.role
1346 }
1347 } else {
1348 if (H === this.dropdownLinks.name) {
1349 w = this.dropdownLinks.linkImage;
1350 M = this.dropdownLinks.linkImageAltTag;
1351 F = this.dropdownLinks.role
1352 } else {
1353 alert("Unrecognized Skype URI name: " + H + " ('" + L.name + "') -- " + this.callLinks.name + "/" + this.chatLinks.name);
1354 return (false)
1355 }
1356 }
1357 }
1358 B += "?" + H
1359 } else {
1360 if (C.length > 0) {
1361 w = this.callLinks.linkImage;
1362 M = this.callLinks.linkImageAltTag;
1363 F = this.callLinks.role
1364 }
1365 } if (D) {
1366 y = this.trimString(L.video);
1367 if (y === "true") {
1368 w = this.videoLinks.linkImage;
1369 M = this.videoLinks.linkImageAltTag;
1370 F = this.videoLinks.role;
1371 B += "&video=" + y
1372 }
1373 }
1374 var s = null;
1375 if ((u) && ((D) || (H === this.chatLinks.name))) {
1376 y = this.trimString(L.topic);
1377 if (y.length > 0) {
1378 s = y;
1379 B += "&topic=" + b(s)
1380 }
1381 }
1382 var N = document.createElement("a");
1383 var v = "";
1384 var A = "";
1385 if (!this.useDetection || (this.isWin8 && this.isIE10) || this.isIE7 || this.isIE6) {
1386 A = B
1387 } else {
1388 if ((this.isWinPhone8 && this.isIE10) || (this.isAndroid && this.isAndroidBrowser)) {
1389 A = "javascript://";
1390 v += " Skype.displayNotSupportedMsg();"
1391 }
1392 else if(this.isAndroid && this.isChrome)
1393 {
1394 v = "Skype.trySkypeUri_Android_Chrome('" + this.analyzeCrumbIndex + "');";
1395 A = B
1396 }
1397 else {
1398 y = "Skype.trySkypeUri_Generic";
1399 if (this.isIE10 || this.isIE9 || this.isIE8) {
1400 y = "Skype.trySkypeUri_IE9_IE8"
1401 } else {
1402 // Note: iOS8 handles Skype.trySkypeUri_Generic so no need to switch to Skype.trySkypeUri_IOS_Safari
1403 if ((this.isIOS7 || this.isIOS6 || this.isIOS5 || this.isIOS4) && this.isSafari) {
1404 y = "Skype.trySkypeUri_IOS_Safari"
1405 } else {
1406 if (this.isAndroid && this.isFF) {
1407 y = "Skype.trySkypeUri_Android_Firefox"
1408 }
1409 }
1410 } if (this.detectSkypeClientFrameId === null) {
1411 this.createDetectionFrame(P);
1412 }
1413 A = "javascript://";
1414 v += y + "('" + B + "', '" + this.detectSkypeClientFrameId + "', '" + this.analyzeCrumbIndex + "'); return false;"
1415 }
1416 }
1417 var z = document.createElement("img");
1418 z.setAttribute("src", w);
1419 z.setAttribute("alt", M);
1420 z.setAttribute("role", F);
1421 z.setAttribute("style", ("border:0; margin:" + this.assetMargin + "px; vertical-align:" + this.assetSizeMap[("size" + this.assetSize)].verticalOffset + "px;"));
1422 if (this.name === this.dropdownLinks.name) {
1423 z.setAttribute("onmouseover", "Skype.showDropdown('dropdown_" + this.element + "'); return false;");
1424 z.setAttribute("onmouseout", "Skype.hideDropdown('dropdown_" + this.element + "'); return false;");
1425 N.setAttribute("style", "cursor: text;");
1426 N.setAttribute("onfocus", "Skype.showDropdown('dropdown_" + this.element + "'); return false;");
1427 N.setAttribute("onblur", "Skype.hideDropdown('dropdown_" + this.element + "'); return false;");
1428 N.setAttribute("href", "javascript://");
1429 N.setAttribute("onclick", "return false;")
1430 } else {
1431 if (this.name === this.chatLinks.name) {
1432 v = "Skype.tryAnalyzeSkypeUri('chat', '" + this.analyzeCrumbIndex + "');" + v
1433 } else {
1434 v = "Skype.tryAnalyzeSkypeUri('call', '" + this.analyzeCrumbIndex + "');" + v
1435 }
1436 N.setAttribute("href", A);
1437 N.setAttribute("onclick", v)
1438 }
1439 N.appendChild(z);
1440 uriPara = document.createElement("p");
1441 uriPara.setAttribute("id", (L.element + "_paraElement"));
1442 uriPara.setAttribute("style", ("font-size:" + (this.assetSize - 2) + "px; color:" + this.assetColor.font));
1443 uriPara.appendChild(N);
1444 if (this.name === this.dropdownLinks.name) {
1445 var O = "-10";
1446 var J = "15";
1447 if (this.assetSize === "10") {
1448 J = "15"
1449 } else {
1450 if (this.assetSize === "12") {
1451 J = "15"
1452 } else {
1453 if (this.assetSize === "14") {
1454 J = "15"
1455 } else {
1456 if (this.assetSize === "16") {
1457 J = "15"
1458 } else {
1459 if (this.assetSize === "24") {
1460 O = "-20";
1461 J = "25"
1462 } else {
1463 if (this.assetSize === "32") {
1464 O = "-30";
1465 J = "30"
1466 }
1467 }
1468 }
1469 }
1470 }
1471 }
1472 var r = document.createElement("ul");
1473 r.id = "dropdown_" + this.element;
1474 r.setAttribute("style", "display: none; position: absolute; margin-top: " + O + "px; margin-left: " + J + "px; width: 200px; padding-left: 20px; padding-right: 20px; border: 2px solid #00AFF0; background-color: white; color: #00AFF0; line-height: 50px; list-style: none; list-style-type: none;");
1475 r.setAttribute("onmouseover", "Skype.showDropdown('dropdown_" + this.element + "'); return false;");
1476 r.setAttribute("onmouseout", "Skype.hideDropdown('dropdown_" + this.element + "'); return false;");
1477 var t = document.createElement("li");
1478 t.setAttribute("style", "list-style: none; list-style-type: none;");
1479 var Q = document.createElement("li");
1480 Q.setAttribute("style", "list-style: none; list-style-type: none;");
1481 var K = "";
1482 var I = document.createElement("a");
1483 I.href = "javascript://";
1484 I.setAttribute("style", "text-decoration: none; color: #00AFF0; font-size: 16px;");
1485 I.setAttribute("href", A);
1486 K = "Skype.tryAnalyzeSkypeUri('dropdownCall', '" + this.analyzeCrumbIndex + "');" + v;
1487 I.setAttribute("onclick", K.replace("?" + this.dropdownLinks.name, "?" + this.callLinks.name));
1488 I.setAttribute("onmouseover", "this.style.textDecoration = 'underline'");
1489 I.setAttribute("onmouseout", "this.style.textDecoration = 'none'");
1490 I.setAttribute("role", "Menu item");
1491 I.setAttribute("onfocus", "Skype.showDropdown('dropdown_" + this.element + "'); return false;");
1492 I.setAttribute("onblur", "Skype.hideDropdown('dropdown_" + this.element + "'); return false;");
1493 var E = document.createElement("a");
1494 E.href = "javascript://";
1495 E.setAttribute("style", "text-decoration: none; color: #00AFF0; font-size: 16px;");
1496 E.setAttribute("href", A);
1497 K = "Skype.tryAnalyzeSkypeUri('dropdownChat', '" + this.analyzeCrumbIndex + "');" + v;
1498 E.setAttribute("onclick", K.replace("?" + this.dropdownLinks.name, "?" + this.chatLinks.name));
1499 E.setAttribute("onmouseover", "this.style.textDecoration = 'underline'");
1500 E.setAttribute("onmouseout", "this.style.textDecoration = 'none'");
1501 I.setAttribute("role", "Menu item");
1502 E.setAttribute("onfocus", "Skype.showDropdown('dropdown_" + this.element + "'); return false;");
1503 E.setAttribute("onblur", "Skype.hideDropdown('dropdown_" + this.element + "'); return false;");
1504 I.innerHTML = "Call";
1505 t.appendChild(I);
1506 E.innerHTML = "Chat";
1507 Q.appendChild(E);
1508 r.appendChild(t);
1509 r.appendChild(Q);
1510 uriPara.appendChild(r)
1511 }
1512 y = null;
1513 if (C.length !== 0) {
1514 if (this.trimString(L.listParticipants) === "true") {
1515 y = " " + C
1516 }
1517 if ((s !== null) && (this.trimString(L.listTopic) === "true")) {
1518 if ((y === null) || (y.length === 0)) {
1519 y = " RE: " + s
1520 } else {
1521 y += ("; RE: " + s)
1522 }
1523 }
1524 if (y === null) {
1525 y = ""
1526 }
1527 uriPara.appendChild(document.createTextNode(y))
1528 }
1529 P.appendChild(uriPara);
1530 this.tryAnalyzeSkypeUri("init", this.analyzeCrumbIndex);
1531 return (true)
1532 }
1533
1534 function j(u, r) {
1535 this.assetSize = this.assetSizeDefault;
1536 this.assetMargin = (this.assetSize >= this.assetMarginMinimum) ? this.assetSize : this.assetMarginMinimum;
1537 var t;
1538 var s = this.assetSizeArray.length;
1539 for (t = 0; t < s; t++) {
1540 if (u === this.assetSizeArray[t]) {
1541 this.assetSize = u;
1542 break
1543 }
1544 }
1545 this.assetMargin = (this.assetSize >= this.assetMarginMinimum) ? this.assetSize : this.assetMarginMinimum;
1546 this.assetColor.path = this.assetColorPathDefault;
1547 this.assetColor.font = this.assetColorFontDefault;
1548 if (r.length > 0) {
1549 if (r === "skype") {
1550 this.assetColor.path = this.assetColorPathSkype;
1551 this.assetColor.font = this.assetColorFontSkype
1552 } else {
1553 if (r === "white") {
1554 this.assetColor.path = this.assetColorPathWhite;
1555 this.assetColor.font = this.assetColorFontWhite
1556 }
1557 }
1558 }
1559 this.focusLinks.linkImage = this.assetPrefix + "Skypeicon" + this.assetColor.path + this.assetSize + "px.png";
1560 this.callLinks.linkImage = this.assetPrefix + "callbutton" + this.assetColor.path + this.assetSize + "px.png";
1561 this.videoLinks.linkImage = this.assetPrefix + "callbutton" + this.assetColor.path + this.assetSize + "px.png";
1562 this.chatLinks.linkImage = this.assetPrefix + "chatbutton" + this.assetColor.path + this.assetSize + "px.png";
1563 this.multiChatLinks.linkImage = this.assetPrefix + "chatbutton" + this.assetColor.path + this.assetSize + "px.png";
1564 this.dropdownLinks.linkImage = this.assetPrefix + "dropdowncallbutton" + this.assetColor.path + this.assetSize + "px.png";
1565 this.focusLinks.linkImageAltTag = "Open Skype";
1566 this.callLinks.linkImageAltTag = "Skype call";
1567 this.videoLinks.linkImageAltTag = "Skype call";
1568 this.chatLinks.linkImageAltTag = "Skype chat, instant message";
1569 this.multiChatLinks.linkImageAltTag = "Skype chat, instant message";
1570 this.dropdownLinks.linkImageAltTag = "Call options";
1571 this.focusLinks.role = "Button";
1572 this.callLinks.role = "Button";
1573 this.videoLinks.role = "Button";
1574 this.chatLinks.role = "Button";
1575 this.multiChatLinks.role = "Button";
1576 this.dropdownLinks.role = "Pop up menu"
1577 }
1578
1579 function o(t) {
1580 if ((t === undefined) || (t === null)) {
1581 return ("")
1582 }
1583 var u = t.length;
1584 var s = u - 1;
1585 var r = false;
1586 while ((!r) && (u > 0)) {
1587 switch (t[s]) {
1588 case " ":
1589 case "\t":
1590 case "\n":
1591 case "\r":
1592 u--;
1593 break;
1594 default:
1595 r = true;
1596 break
1597 }
1598 s--
1599 }
1600 if (u > 0) {
1601 return (t.substr(0, u))
1602 }
1603 return ("")
1604 }
1605
1606 function b(s) {
1607 if ((s === undefined) || (s === null)) {
1608 return ("")
1609 }
1610 var r = s.replace(/\s/g, "%20");
1611 r = r.replace(/:/g, "%3A");
1612 r = r.replace(/\x2F/g, "%2F");
1613 return (r.replace(/\x5C/g, "%5C"))
1614 }
1615
1616 function h(r) {
1617 if(!r) {
1618 var divs = document.getElementsByTagName("div");
1619 for(var i = 0; i < divs.length; i++) {
1620 if(divs[i].id && divs[i].id.match("SkypeButton")) {
1621 r = divs[i];
1622 }
1623 }
1624 }
1625 var t = new Date();
1626 this.detectSkypeClientFrameId = "_detectSkypeClient_" + t.getTime().toString();
1627 var s = document.createElement("iframe");
1628 s.setAttribute("style", "display:none;");
1629 s.setAttribute("id", this.detectSkypeClientFrameId);
1630 r.appendChild(s);
1631 }
1632
1633 function n(s, w, u) {
1634 var v = false;
1635 var r = window.open("", "_blank", "width=100, height=100");
1636 var t = r.document.createElement("iframe");
1637 t.setAttribute("src", s);
1638 r.document.body.appendChild(t);
1639 setTimeout(function () {
1640 try {
1641 r.location.href;
1642 v = true
1643 } catch (x) {}
1644 if (v) {
1645 r.setTimeout("window.close()", 10)
1646 } else {
1647 r.close();
1648 alert(Skype.installSkypeMsg);
1649 Skype.tryAnalyzeSkypeUri("redirect", u);
1650 window.location = Skype.SkypeClientDownloadUrl
1651 }
1652 }, 100)
1653 }
1654
1655 function e(s, v, t) {
1656 var r = document.getElementById(v);
1657 var u = true;
1658 window.addEventListener("pagehide", function () {
1659 u = false
1660 }, false);
1661 if (r !== null) {
1662 r.src = s
1663 }
1664 setTimeout(function () {
1665 if (u) {
1666 alert(Skype.installSkypeMsg);
1667 Skype.tryAnalyzeSkypeUri("redirect", t);
1668 window.location = Skype.SkypeClientDownloadUrl
1669 }
1670 }, 2000)
1671 }
1672
1673 function q(s, v, u) {
1674 var t = false;
1675 var r = document.getElementById(v);
1676 if (r !== null) {
1677 try {
1678 r.contentWindow.location.href = s;
1679 t = true
1680 } catch (w) {
1681 t = false
1682 }
1683 }
1684 setTimeout(function () {
1685 if (!t) {
1686 alert(Skype.installSkypeMsg);
1687 Skype.tryAnalyzeSkypeUri("redirect", u);
1688 window.location = Skype.SkypeClientDownloadUrl
1689 }
1690 }, 2000)
1691 }
1692
1693 function a(s, v, t) {
1694 var u = true;
1695 window.onblur = function () {
1696 u = false;
1697 };
1698 var r = document.getElementById(v);
1699 if (r !== null) {
1700 r.src = s
1701 }
1702 setTimeout(function () {
1703 if (u) {
1704 alert(Skype.installSkypeMsg);
1705 Skype.tryAnalyzeSkypeUri("redirect", t);
1706 window.location = Skype.SkypeClientDownloadUrl
1707 }
1708 }, 2000)
1709 }
1710
1711 function a_androidchrome(analyzeCrumbIndex) {
1712 var documentVisible = true;
1713 var vizchangecb;
1714
1715 document.addEventListener("visibilitychange", vizchangecb = function () {
1716 documentVisible = !document.hidden;
1717 });
1718
1719 setTimeout(function () {
1720
1721 if (documentVisible) {
1722 alert(Skype.installSkypeMsg);
1723 Skype.tryAnalyzeSkypeUri("redirect", analyzeCrumbIndex);
1724 window.location = Skype.SkypeClientDownloadUrl
1725 }
1726
1727 document.removeEventListener("visibilitychange", vizchangecb);
1728 }, 6000) // if Skype app is booting the Skype splash screen prevents the visibilitychange event firing
1729 // until it is done, so we allow for a longer timeout in case we have to wait for it
1730 }
1731 }();
1732
1733 /*jshint +W003:true */
1734 /*jshint +W107:true */
1735 /*jshint +W057:true */
prototype/skype.html
File was created 1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Page Title</title>
5
6 <script type="text/javascript" src="alfresco-skype-uri.js"></script>
7 <script
8 src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
9 </head>
10 <body>
11
12 <script type="text/javascript">
13 $(document).ready(function()
14 {
15 $("a[href$=\"/profile\"").each(function(index)
16 {
17 var href = $(this).attr("href");
18 if (href.indexOf("/share/page/user/") > -1)
19 {
20 $(this).hover(function()
21 {
22 // Parses out the Alfresco username.
23 //TODO: Use regex
24 var user = "/user/";
25 var start = href.indexOf(user) + user.length;
26 var end = href.indexOf("/profile");
27 var username = href.substring(start, end);
28 var id = "skype_bubble_" + username;
29 var skypeBubble = $("#" + id);
30
31 if (skypeBubble.length)
32 {
33 console.log("found it");
34 $(this).append(skypeBubble);
35 }
36 else
37 {
38 //TODO: Determine if this user has a skype id, and then display Skype buttons
39 //Perhaps use Yahoo bubble like we did for Roles
40 $(this).append($("<div id=\"" + id
41 + "\" style=\"background-color: #0094ff\" />"));
42 Skype.ui(
43 {
44 name : "dropdown",
45 element : id,
46 participants : [ "kngtinc117-test-skype" ],//["echo123"],
47 imageSize : 32,
48 imageColor : "white",
49 video : true
50 });
51 }
52
53 }, function()
54 {
55 //TODO: Only remove after a few seconds if user is not hovering above this or the skype bubble
56 $(this).find("div:last").remove();
57 });
58 }
59 });
60 });
61 </script>
62
63 <a href="/share/page/user/dsamarzija/profile" class="theme-color-1">Dario
64 Samarzija</a>
65 <br>
66 <a href="/share/page/user/dsamarzija2/profile" class="theme-color-1">Dario
67 Samarzija2</a>
68
69 <span id="jelena">something</span>
70
71 <div id="SkypeButton_Call_ahmedowian_1">
72 <script type="text/javascript">
73 Skype.ui(
74 {
75 "name" : "dropdown",
76 video : true,
77 "element" : "SkypeButton_Call_ahmedowian_1",
78 "participants" : [ "jelena.cule97", "echo123" ],
79 "imageSize" : 32
80 });
81 </script>
82 </div>
83 </body>
84 </html>
85
1 #!/bin/bash 1 #!/bin/bash
2 # Downloads the spring-loaded lib if not existing and runs the full all-in-one 2 # Downloads the spring-loaded lib if not existing and runs the full all-in-one
3 # (Alfresco + Share + Solr) using the runner project 3 # (Alfresco + Share + Solr) using the runner project
4 springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.3.RELEASE/springloaded-1.2.3.RELEASE.jar 4 springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.3.RELEASE/springloaded-1.2.3.RELEASE.jar
5 5
6 if [ ! -f $springloadedfile ]; then 6 if [ ! -f $springloadedfile ]; then
7 mvn validate -Psetup 7 mvn validate -Psetup
8 fi 8 fi
9 MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G -XX:MaxPermSize=512m" mvn clean install -Prun,enterprise 9 MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G -XX:MaxPermSize=512m" mvn clean install -Prun
10 10