PeatixReload

Auto refresh until ticket sales opened

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         PeatixReload
// @namespace    https://greasyfork.org/en/users/200777
// @version      1.0
// @description  Auto refresh until ticket sales opened
// @author       zhuhang.jasper
// @match        https://devfestxfirebase.peatix.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    
    // Replace @match to your event URL
    // If doesnt work, change the className of HTML element
    
    console.log('refreshing...');
    var action = document.getElementsByClassName('tix-action');
    if ((action[0].innerHTML).trim() == '') {
        setInterval(location.reload(),1000);
    } else {
        alert('You can buy ticket now!');
    }
    //console.log(action);
    
})();