window.addEventListener("load", function(){ window.cookieconsent.initialise({ "palette": { "popup": { "background": "#2b2828" }, "button": { "background": "#01a2a6" } }, "theme": "edgeless", "content": { "message": "This website uses cookies. By using this website, you agree to our use of cookies as described in our Privacy Policy. ", "href": "https://www.tradepub.com/?p=priv&w=wp" }, location: { serviceDefinitions: { mynewservice: function(options) { return { url: '/c/ip2country.mpl', callback: function(done, response) { try { var json = JSON.parse(response); if (json.countryCode) { return {code: json.countryCode} } throw 'Could not find a country code in the response'; } catch (err) { return new Error('Invalid response (' + err + ')'); } }, }; }, }, services: [ 'mynewservice' ] } })});