Version graphs to bypass cache

This commit is contained in:
JonnyWong16 2018-10-19 18:58:26 -07:00
parent 5c54283df7
commit d728f7a11e
2 changed files with 14 additions and 11 deletions

View file

@ -305,17 +305,17 @@
setLocalStorage(chart_key, JSON.stringify(chart_visibility)); setLocalStorage(chart_key, JSON.stringify(chart_visibility));
} }
</script> </script>
<script src="${http_root}js/graphs/plays_by_day.js"></script> <script src="${http_root}js/graphs/plays_by_day.js${cache_param}"></script>
<script src="${http_root}js/graphs/plays_by_dayofweek.js"></script> <script src="${http_root}js/graphs/plays_by_dayofweek.js${cache_param}"></script>
<script src="${http_root}js/graphs/plays_by_hourofday.js"></script> <script src="${http_root}js/graphs/plays_by_hourofday.js${cache_param}"></script>
<script src="${http_root}js/graphs/plays_by_platform.js"></script> <script src="${http_root}js/graphs/plays_by_platform.js${cache_param}"></script>
<script src="${http_root}js/graphs/plays_by_user.js"></script> <script src="${http_root}js/graphs/plays_by_user.js${cache_param}"></script>
<script src="${http_root}js/graphs/plays_by_stream_type.js"></script> <script src="${http_root}js/graphs/plays_by_stream_type.js${cache_param}"></script>
<script src="${http_root}js/graphs/plays_by_source_resolution.js"></script> <script src="${http_root}js/graphs/plays_by_source_resolution.js${cache_param}"></script>
<script src="${http_root}js/graphs/plays_by_stream_resolution.js"></script> <script src="${http_root}js/graphs/plays_by_stream_resolution.js${cache_param}"></script>
<script src="${http_root}js/graphs/plays_by_platform_by_stream_type.js"></script> <script src="${http_root}js/graphs/plays_by_platform_by_stream_type.js${cache_param}"></script>
<script src="${http_root}js/graphs/plays_by_user_by_stream_type.js"></script> <script src="${http_root}js/graphs/plays_by_user_by_stream_type.js${cache_param}"></script>
<script src="${http_root}js/graphs/plays_by_month.js"></script> <script src="${http_root}js/graphs/plays_by_month.js${cache_param}"></script>
<script> <script>
$(document).ready(function () { $(document).ready(function () {

View file

@ -525,6 +525,9 @@ function setLocalStorage(key, value, path) {
localStorage.setItem(key, value); localStorage.setItem(key, value);
} }
function getLocalStorage(key, default_value, path) { function getLocalStorage(key, default_value, path) {
if (path !== false) {
key = key + '_' + window.location.pathname;
}
var value = localStorage.getItem(key); var value = localStorage.getItem(key);
if (value !== null) { if (value !== null) {
return value return value