]> git.mxchange.org Git - friendica.git/blob - view/templates/head.tpl
Merge pull request #6655 from annando/worker-limit
[friendica.git] / view / templates / head.tpl
1
2 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
3 <base href="{{$baseurl}}/" />
4 <meta name="generator" content="{{$generator}}" />
5 <link rel="stylesheet" href="view/global.css" type="text/css" media="all" />
6 <link rel="stylesheet" href="view/asset/jquery-colorbox/example5/colorbox.css" type="text/css" media="screen" />
7 <link rel="stylesheet" href="view/asset/jgrowl/jquery.jgrowl.min.css" type="text/css" media="screen" />
8 <link rel="stylesheet" href="view/asset/jquery-datetimepicker/build/jquery.datetimepicker.min.css" type="text/css" media="screen" />
9 <link rel="stylesheet" href="view/asset/perfect-scrollbar/css/perfect-scrollbar.min.css" type="text/css" media="screen" />
10
11 {{foreach $stylesheets as $stylesheetUrl}}
12 <link rel="stylesheet" href="{{$stylesheetUrl}}" type="text/css" media="screen" />
13 {{/foreach}}
14
15 <link rel="shortcut icon" href="{{$shortcut_icon}}" />
16 <link rel="apple-touch-icon" href="{{$touch_icon}}"/>
17
18 <meta name="apple-mobile-web-app-capable" content="yes" />
19 <link rel="manifest" href="{{$baseurl}}/manifest" />
20 <script>
21 // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
22 // Prevents links to switch to Safari in a home screen app - see https://gist.github.com/irae/1042167
23 (function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(chref=d.href).replace("{{$baseurl}}/", "").replace(e.href,"").indexOf("#")&&(!/^[a-z\+\.\-]+:/i.test(chref)||chref.indexOf(e.protocol+"//"+e.host)===0)&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone");
24 // |license-end
25 </script>
26
27 <link rel="search"
28          href="{{$baseurl}}/opensearch"
29          type="application/opensearchdescription+xml"
30          title="Search in Friendica" />
31
32 <!--[if IE]>
33 <script type="text/javascript" src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
34 <![endif]-->
35 <script type="text/javascript" src="view/js/modernizr.js" ></script>
36 <script type="text/javascript" src="view/asset/jquery/dist/jquery.min.js" ></script>
37 <script type="text/javascript" src="view/js/jquery.textinputs.js" ></script>
38 <script type="text/javascript" src="view/js/jquery-textcomplete/jquery.textcomplete.min.js" ></script>
39 <script type="text/javascript" src="view/js/autocomplete.js" ></script>
40 <script type="text/javascript" src="view/asset/jquery-colorbox/jquery.colorbox-min.js"></script>
41 <script type="text/javascript" src="view/asset/jgrowl/jquery.jgrowl.min.js"></script>
42 <script type="text/javascript" src="view/asset/jquery-datetimepicker/build/jquery.datetimepicker.full.min.js"></script>
43 <script type="text/javascript" src="view/asset/perfect-scrollbar/js/perfect-scrollbar.jquery.min.js" ></script>
44 <script type="text/javascript" src="view/asset/imagesloaded/imagesloaded.pkgd.min.js"></script>
45 <script type="text/javascript" src="view/js/acl.js" ></script>
46 <script type="text/javascript" src="view/asset/base64/base64.min.js" ></script>
47 <script type="text/javascript" src="view/js/main.js" ></script>
48 <script>
49
50         // Lifted from https://css-tricks.com/snippets/jquery/move-cursor-to-end-of-textarea-or-input/
51     jQuery.fn.putCursorAtEnd = function() {
52         return this.each(function() {
53             // Cache references
54             var $el = $(this),
55                 el = this;
56
57             // Only focus if input isn't already
58             if (!$el.is(":focus")) {
59                 $el.focus();
60             }
61
62             // If this function exists... (IE 9+)
63             if (el.setSelectionRange) {
64                 // Double the length because Opera is inconsistent about whether a carriage return is one character or two.
65                 var len = $el.val().length * 2;
66
67                 // Timeout seems to be required for Blink
68                 setTimeout(function() {
69                     el.setSelectionRange(len, len);
70                 }, 1);
71             } else {
72                 // As a fallback, replace the contents with itself
73                 // Doesn't work in Chrome, but Chrome supports setSelectionRange
74                 $el.val($el.val());
75             }
76
77             // Scroll to the bottom, in case we're in a tall textarea
78             // (Necessary for Firefox and Chrome)
79             this.scrollTop = 999999;
80         });
81     };
82
83     var updateInterval = {{$update_interval}};
84         var localUser = {{if $local_user}}{{$local_user}}{{else}}false{{/if}};
85
86         function confirmDelete() { return confirm("{{$delitem}}"); }
87         function commentExpand(id) {
88                 $("#comment-edit-text-" + id).putCursorAtEnd();
89                 $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
90                 $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
91                 $("#comment-edit-text-" + id).focus();
92                 $("#mod-cmnt-wrap-" + id).show();
93                 openMenu("comment-edit-submit-wrapper-" + id);
94                 return true;
95         }
96         function commentOpen(obj,id) {
97                 if (obj.value == "") {
98                         $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
99                         $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
100                         $("#mod-cmnt-wrap-" + id).show();
101                         openMenu("comment-edit-submit-wrapper-" + id);
102                         return true;
103                 }
104                 return false;
105         }
106         function commentClose(obj,id) {
107                 if (obj.value == "") {
108                         $("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
109                         $("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
110                         $("#mod-cmnt-wrap-" + id).hide();
111                         closeMenu("comment-edit-submit-wrapper-" + id);
112                         return true;
113                 }
114                 return false;
115         }
116
117
118         function commentInsert(obj,id) {
119                 var tmpStr = $("#comment-edit-text-" + id).val();
120                 if (tmpStr == "") {
121                         $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
122                         $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
123                         openMenu("comment-edit-submit-wrapper-" + id);
124                 }
125                 var ins = $(obj).html();
126                 ins = ins.replace("&lt;","<");
127                 ins = ins.replace("&gt;",">");
128                 ins = ins.replace("&amp;","&");
129                 ins = ins.replace("&quot;","\"");
130                 $("#comment-edit-text-" + id).val(tmpStr + ins);
131         }
132
133         function qCommentInsert(obj,id) {
134                 var tmpStr = $("#comment-edit-text-" + id).val();
135                 if (tmpStr == "") {
136                         $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
137                         $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
138                         openMenu("comment-edit-submit-wrapper-" + id);
139                 }
140                 var ins = $(obj).val();
141                 ins = ins.replace("&lt;","<");
142                 ins = ins.replace("&gt;",">");
143                 ins = ins.replace("&amp;","&");
144                 ins = ins.replace("&quot;","\"");
145                 $("#comment-edit-text-" + id).val(tmpStr + ins);
146                 $(obj).val("");
147         }
148
149         window.showMore = "{{$showmore}}";
150         window.showFewer = "{{$showfewer}}";
151
152         function showHideCommentBox(id) {
153                 if ($("#comment-edit-form-" + id).is(":visible")) {
154                         $("#comment-edit-form-" + id).hide();
155                 } else {
156                         $("#comment-edit-form-" + id).show();
157                 }
158         }
159
160
161 </script>
162
163