diff options
author | sualko <klaus@jsxc.org> | 2019-03-04 13:07:47 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2019-03-04 13:07:47 +0300 |
commit | 22918a2bf5734d0dcfa922afee25b8e865ce2f51 (patch) | |
tree | 886ce1440b54f6df7f30a8a5ae3c369844feeabb | |
parent | b2ba64b80975efeaab328b068109029188c293e7 (diff) |
build v0.5.1v0.5.1
-rwxr-xr-x | appinfo/info.xml | 2 | ||||
-rw-r--r-- | build/appinfo/app.php | 6 | ||||
-rw-r--r-- | build/appinfo/info.xml | 2 | ||||
-rw-r--r-- | build/js/settings/admin.js | 2 | ||||
-rw-r--r-- | build/js/settings/admin.min.js | 2 | ||||
-rw-r--r-- | build/js/settings/admin.min.js.map | 2 | ||||
-rw-r--r-- | build/js/track.js | 6 | ||||
-rw-r--r-- | build/lib/Controller/JavaScriptController.php | 2 | ||||
-rw-r--r-- | build/templates/settings/admin.php | 1 | ||||
-rw-r--r-- | package.json | 2 |
10 files changed, 17 insertions, 10 deletions
diff --git a/appinfo/info.xml b/appinfo/info.xml index 7abef05..352a792 100755 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -4,7 +4,7 @@ <name>Piwik/Matomo Tracking</name> <summary>Track users with Piwik/Matomo</summary> <description>Track users with Piwik/Matomo</description> - <version>0.5.0</version> + <version>0.5.1</version> <licence>agpl</licence> <author>Klaus Herberth</author> <category>tools</category> diff --git a/build/appinfo/app.php b/build/appinfo/app.php index 44b441c..eeffecb 100644 --- a/build/appinfo/app.php +++ b/build/appinfo/app.php @@ -10,7 +10,11 @@ if (!empty($url)) { ], '' ); - $url = parse_url($url, PHP_URL_HOST); + $parseurl = parse_url($url); + $url = $parseurl['host']; + if (isset($parseurl['port'])) { + $url .= ':' . (string) $parseurl['port']; + } $policy = new OCP\AppFramework\Http\ContentSecurityPolicy(); if ($url !== false && array_key_exists('HTTP_HOST', $_SERVER) diff --git a/build/appinfo/info.xml b/build/appinfo/info.xml index 7abef05..352a792 100644 --- a/build/appinfo/info.xml +++ b/build/appinfo/info.xml @@ -4,7 +4,7 @@ <name>Piwik/Matomo Tracking</name> <summary>Track users with Piwik/Matomo</summary> <description>Track users with Piwik/Matomo</description> - <version>0.5.0</version> + <version>0.5.1</version> <licence>agpl</licence> <author>Klaus Herberth</author> <category>tools</category> diff --git a/build/js/settings/admin.js b/build/js/settings/admin.js index cf5c94f..6a577e7 100644 --- a/build/js/settings/admin.js +++ b/build/js/settings/admin.js @@ -1,6 +1,8 @@ /* global OCP, OC */ $(function() { + $('#piwikAdblockerWarning').hide(); + function showRequestResult(element, result) { if (element.attr('type') === 'checkbox') { element = $('label[for="' + element.attr('id') + '"]'); diff --git a/build/js/settings/admin.min.js b/build/js/settings/admin.min.js index 13b6027..5ec4252 100644 --- a/build/js/settings/admin.min.js +++ b/build/js/settings/admin.min.js @@ -1,2 +1,2 @@ -$(function(){function showRequestResult(element,result){"checkbox"===element.attr("type")&&(element=$('label[for="'+element.attr("id")+'"]')),element.removeClass("piwik-success piwik-error"),element.addClass("piwik-"+result);var timeout=element.data("timeout");timeout&&clearTimeout(timeout),timeout=setTimeout(function(){element.removeClass("piwik-success piwik-error")},1e3),element.data("timeout",timeout)}$("#piwikUrl").attr("placeholder","e.g. //"+window.location.host+"/piwik/"),$("#piwikSettings input").change(function(){var element=$(this),key=$(this).attr("name"),value="checkbox"===$(this).attr("type")?$(this).prop("checked"):$(this).val();$.ajax({method:"PUT",url:OC.generateUrl("apps/piwik/settings/"+key),data:{value:value},success:function(response){showRequestResult(element,response.status)},error:function(){showRequestResult(element,"error")}})})}); +$(function(){function showRequestResult(element,result){"checkbox"===element.attr("type")&&(element=$('label[for="'+element.attr("id")+'"]')),element.removeClass("piwik-success piwik-error"),element.addClass("piwik-"+result);var timeout=element.data("timeout");timeout&&clearTimeout(timeout),timeout=setTimeout(function(){element.removeClass("piwik-success piwik-error")},1e3),element.data("timeout",timeout)}$("#piwikAdblockerWarning").hide(),$("#piwikUrl").attr("placeholder","e.g. //"+window.location.host+"/piwik/"),$("#piwikSettings input").change(function(){var element=$(this),key=$(this).attr("name"),value="checkbox"===$(this).attr("type")?$(this).prop("checked"):$(this).val();$.ajax({method:"PUT",url:OC.generateUrl("apps/piwik/settings/"+key),data:{value:value},success:function(response){showRequestResult(element,response.status)},error:function(){showRequestResult(element,"error")}})})}); //# sourceMappingURL=admin.min.js.map
\ No newline at end of file diff --git a/build/js/settings/admin.min.js.map b/build/js/settings/admin.min.js.map index 385d7d6..b1f3db7 100644 --- a/build/js/settings/admin.min.js.map +++ b/build/js/settings/admin.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../js/settings/admin.js"],"names":["$","showRequestResult","element","result","attr","removeClass","addClass","timeout","data","clearTimeout","setTimeout","window","location","host","change","this","key","value","prop","val","ajax","method","url","OC","generateUrl","success","response","status","error"],"mappings":"AAEAA,EAAE,WACC,SAASC,kBAAkBC,QAASC,QACJ,aAAzBD,QAAQE,KAAK,UACdF,QAAUF,EAAE,cAAgBE,QAAQE,KAAK,MAAQ,OAGpDF,QAAQG,YAAY,6BACpBH,QAAQI,SAAS,SAAWH,QAE5B,IAAII,QAAUL,QAAQM,KAAK,WAEvBD,SACDE,aAAaF,SAGhBA,QAAUG,WAAW,WAClBR,QAAQG,YAAY,8BACpB,KAEHH,QAAQM,KAAK,UAAWD,SAG3BP,EAAE,aAAaI,KAAK,cAAe,UAAYO,OAAOC,SAASC,KAAO,WAEtEb,EAAE,wBAAwBc,OAAO,WAC9B,IAAIZ,QAAUF,EAAEe,MACZC,IAAMhB,EAAEe,MAAMX,KAAK,QACnBa,MAAiC,aAAzBjB,EAAEe,MAAMX,KAAK,QAAyBJ,EAAEe,MAAMG,KAAK,WAAalB,EAAEe,MAAMI,MAEpFnB,EAAEoB,MACCC,OAAQ,MACRC,IAAKC,GAAGC,YAAY,uBAAyBR,KAC7CR,MACGS,MAAOA,OAEVQ,QAAS,SAASC,UACfzB,kBAAkBC,QAASwB,SAASC,SAEvCC,MAAO,WACJ3B,kBAAkBC,QAAS","file":"admin.min.js"}
\ No newline at end of file +{"version":3,"sources":["../../../js/settings/admin.js"],"names":["$","showRequestResult","element","result","attr","removeClass","addClass","timeout","data","clearTimeout","setTimeout","hide","window","location","host","change","this","key","value","prop","val","ajax","method","url","OC","generateUrl","success","response","status","error"],"mappings":"AAEAA,EAAE,WAGC,SAASC,kBAAkBC,QAASC,QACJ,aAAzBD,QAAQE,KAAK,UACdF,QAAUF,EAAE,cAAgBE,QAAQE,KAAK,MAAQ,OAGpDF,QAAQG,YAAY,6BACpBH,QAAQI,SAAS,SAAWH,QAE5B,IAAII,QAAUL,QAAQM,KAAK,WAEvBD,SACDE,aAAaF,SAGhBA,QAAUG,WAAW,WAClBR,QAAQG,YAAY,8BACpB,KAEHH,QAAQM,KAAK,UAAWD,SApB3BP,EAAE,0BAA0BW,OAuB5BX,EAAE,aAAaI,KAAK,cAAe,UAAYQ,OAAOC,SAASC,KAAO,WAEtEd,EAAE,wBAAwBe,OAAO,WAC9B,IAAIb,QAAUF,EAAEgB,MACZC,IAAMjB,EAAEgB,MAAMZ,KAAK,QACnBc,MAAiC,aAAzBlB,EAAEgB,MAAMZ,KAAK,QAAyBJ,EAAEgB,MAAMG,KAAK,WAAanB,EAAEgB,MAAMI,MAEpFpB,EAAEqB,KAAK,CACJC,OAAQ,MACRC,IAAKC,GAAGC,YAAY,uBAAyBR,KAC7CT,KAAM,CACHU,MAAOA,OAEVQ,QAAS,SAASC,UACf1B,kBAAkBC,QAASyB,SAASC,SAEvCC,MAAO,WACJ5B,kBAAkBC,QAAS","file":"admin.min.js"}
\ No newline at end of file diff --git a/build/js/track.js b/build/js/track.js index 94a18ca..d84a185 100644 --- a/build/js/track.js +++ b/build/js/track.js @@ -1,13 +1,13 @@ /*! - * cloud_piwik v0.5.0 - 2018-10-29 + * cloud_piwik v0.5.1 - 2019-03-04 * - * Copyright (c) 2018 Klaus Herberth <klaus@jsxc.org> <br> + * Copyright (c) 2019 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license * * Please see https://github.com/sualko/cloud_piwik * * @author Klaus Herberth <klaus@jsxc.org> - * @version 0.5.0 + * @version 0.5.1 * @license MIT */ diff --git a/build/lib/Controller/JavaScriptController.php b/build/lib/Controller/JavaScriptController.php index bc15c76..430f3dd 100644 --- a/build/lib/Controller/JavaScriptController.php +++ b/build/lib/Controller/JavaScriptController.php @@ -47,6 +47,6 @@ class JavaScriptController extends Controller $script = file_get_contents(__DIR__ . '/../../js/track.js'); $script = str_replace('%OPTIONS%', json_encode($options), $script); - return new DataDownloadResponse($script, 'script', 'text/javascript'); + return new DataDownloadResponse($script, 'tracking.js', 'text/javascript'); } } diff --git a/build/templates/settings/admin.php b/build/templates/settings/admin.php index ed4ec9e..023834f 100644 --- a/build/templates/settings/admin.php +++ b/build/templates/settings/admin.php @@ -6,6 +6,7 @@ style('piwik', 'settings'); <div id="piwikSettings" class="section"> <h2>Piwik/Matomo Tracking</h2> <p class="settings-hint">If you have no Piwik/Matomo instance, go to <a href="https://matomo.org" target="_blank">matomo.org</a> for further instructions.</p> + <p id="piwikAdblockerWarning" style="border-left:2px red solid;padding-left:1em">It seems that you use a content blocker plugin in your browser to stop trackers like Matomo. Unfortunately, your plugin also breaks this settings form, so you might want to disable the content blocker for your NextCloud.</p> <form> <table> diff --git a/package.json b/package.json index 9a82f51..f0ad20c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloud_piwik", - "version": "0.5.0", + "version": "0.5.1", "description": "Track owncloud/nextcloud users with piwik", "repository": { "type": "git", |