2021-05-31 01:31:48 +00:00
|
|
|
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later
|
2021-05-30 05:29:24 +00:00
|
|
|
/*
|
|
|
|
* Stairway.js: a simple JavaScript privacy quiz
|
|
|
|
* Copyright © 2021 luca0N!
|
|
|
|
*
|
|
|
|
* This file is part of Stairway.js.
|
|
|
|
*
|
|
|
|
* Stairway.js is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Stairway.js is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Stairway.js. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* E-mail contact: <luca0n@luca0n.com>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Attempts to fetch the resource file and returns it via callback.
|
|
|
|
* @param file The desired file.
|
|
|
|
* @param callback A function(string) which will be used to return the result of the requested file.
|
|
|
|
* @since 2021-05-27
|
|
|
|
*/
|
|
|
|
function sendGetRequest(file, listener){
|
|
|
|
let request = new XMLHttpRequest();
|
|
|
|
request.addEventListener('load', function(){
|
|
|
|
listener(this.responseText);
|
|
|
|
});
|
|
|
|
request.open("GET", file);
|
|
|
|
request.send();
|
|
|
|
}
|
2021-05-31 01:31:48 +00:00
|
|
|
// @license-end
|