Common Framework

Framework to be used by most DF requesters/scripts

Ekde 2017/10/23. Vidu La ĝisdata versio.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greatest.deepsurf.us/scripts/34464/225703/Common%20Framework.js

// ==UserScript==
// @name         Common Framework
// @version      0.6
// @description  Framework to be used by most DF requesters/scripts
// @author       A Meaty Alt
// @grant        none
// ==/UserScript==
var params = $("#flashMain1")[0].children[0].value;
var sc = params.match(/sc=(.*?)\&/)[1];
var userId = params.match(/userID=(.*?)\&/)[1];
var hashedPassword = params.match(/password=(.*?)\&/)[1];
var pageTime = params.match(/pagetime=(.*?)\&/)[1];
setInterval(() => {
    $.get("http://fairview.deadfrontier.com/onlinezombiemmo/index.php?page=35",
      (response) => {
          pageTime = response.match(/pagetime=(.*?)\&/)[1];
      });
}, 60000);

function buildSecureBody(){
    return {
        sc: sc,
        userId: userId,
        password: hashedPassword,
        pagetime: pageTime
    };
}