Skip to content

Commit af25985

Browse files
committed
Optimize popup js by replacing parseInt with Unary Plus Operator (+)
1 parent 0f0acda commit af25985

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

styles/all/template/includes/phpbb_ads_pop_up.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
const interval_days = 1;
88
const lastShown = localStorage.getItem(key);
99

10-
if (!lastShown || Date.now() - parseInt(lastShown, 10) >= interval_days * 86400000) {
10+
if (!lastShown || Date.now() - +lastShown >= interval_days * 86400000) {
1111
localStorage.setItem(key, Date.now());
1212
window.addEventListener('load', () => {
1313
phpbb.alert(

0 commit comments

Comments
 (0)