Skip to content

Commit 8b3643c

Browse files
committed
Fix NS_BINDING_ABORTED in Firefox
1 parent 2248af5 commit 8b3643c

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

server/reportmanager/templates/layouts/layout_base.html

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -32,46 +32,6 @@
3232
<script src="{% static 'js/params.js' %}"/></script>
3333
<script src="{% static 'js/cookie-csrf.js' %}"/></script>
3434

35-
<script>
36-
(() => {
37-
const notify_badge_class = 'badge';
38-
const notify_api_url = '/inbox/notifications/api/unread_count/';
39-
const notify_fetch_count = '5';
40-
const notify_refresh_period = 0;
41-
const consecutive_misfires = 0;
42-
43-
function fill_notification_badge(data) {
44-
const badges = document.getElementsByClassName(notify_badge_class);
45-
for (let i = 0; i < badges.length|0; i++) {
46-
badges[i].innerHTML = data;
47-
}
48-
}
49-
50-
function fetch_api_data() {
51-
fetch(notify_api_url+'?max='+notify_fetch_count, {credentials: 'same-origin'})
52-
.then(response => {
53-
if (response.ok) {
54-
response.json()
55-
.then(data => {
56-
fill_notification_badge(data.unread_count);
57-
})
58-
if (notify_refresh_period) {
59-
setTimeout(fetch_api_data, notify_refresh_period);
60-
}
61-
} else {
62-
swal('Oops', E_SERVER_ERROR, 'error');
63-
console.debug(response);
64-
}
65-
})
66-
.catch(e => {
67-
fill_notification_badge('!');
68-
});
69-
}
70-
71-
document.addEventListener("DOMContentLoaded", fetch_api_data)
72-
})()
73-
</script>
74-
7535
{% endblock js%}
7636
{% if debug %}
7737
<script>

0 commit comments

Comments
 (0)