summaryrefslogtreecommitdiff
path: root/web/js/tools.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-10-06 02:03:58 +0300
committerDevaev Maxim <[email protected]>2018-10-06 02:03:58 +0300
commit370b5b672c1e56237df944ca5917ca8111683e0e (patch)
treefc7ba038ce0b3174174ff18c3ca1f316a4e9a7a1 /web/js/tools.js
parent5feb54d3c46e2c846a1b635a3b5f9de77965e867 (diff)
show fps in stream header
Diffstat (limited to 'web/js/tools.js')
-rw-r--r--web/js/tools.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/js/tools.js b/web/js/tools.js
index 76f27b7d..9f94175a 100644
--- a/web/js/tools.js
+++ b/web/js/tools.js
@@ -10,6 +10,13 @@ var tools = new function() {
return http;
};
+ this.getCookie = function(name) {
+ var matches = document.cookie.match(new RegExp(
+ "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") + "=([^;]*)" // eslint-disable-line no-useless-escape
+ ));
+ return (matches ? decodeURIComponent(matches[1]) : "");
+ };
+
this.setOnClick = function(el, callback) {
el.onclick = el.ontouchend = function(event) {
event.preventDefault();