MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/*if ( mw.config.get('wgPageName') === 'Current_worldguards' ) {
function fetch_worldguard_data() {
fetch("https://puucraft-dynmap-regionsworldjson-test.mixarium.repl.co/", {"method": "GET", "mode": 'cors', 'headers': {"content-security-policy": "connect-src 'self'"}) /* gosh, how do i get around CSP? */
.then(function(response) {
if (response.ok) {
Line 26:
fetch_worldguard_data()
};
*/
 
if ( mw.config.get('wgPageName') === 'Puucraft' ) {
function get_time_difference_from_current(unix_in_ms) {