Warning: fopen(/www/sites/update.greasyfork.icu/index/store/forever/001f9057a2622ec27d9b0c5640d857e4.js): failed to open stream: No space left on device in /www/sites/update.greasyfork.icu/index/scriptControl.php on line 65
// ==UserScript==
// @name (MTurk) Show Qualtrics Progress if Progressbar Hidden
// @namespace mktemp@pm.me
// @version 1.22
// @description Shows hidden progress on qualtrics surveys
// @author letsfindcommonground
// @match https://*.qualtrics.com/*
// @grant none
// @downloadURL none
// ==/UserScript==
(function() {
'use strict';
if(!(window.QSettings && window.QSettings.pt)) {
return;
}
let progress = window.QSettings.pt.ProgressPercent;
document.querySelector('body').insertAdjacentHTML('afterbegin', `
${progress}%
`);
let indicator = document.querySelector('#tampermonkey-progress-indicator');
indicator.style.cssText = `color: white; background: black; padding: 8px 12px;
position: absolute; left: 0; top: 0; font-family: 'Roboto', sans-serif; font-size: 0.9em;
border-bottom-right-radius: 8px;`;
let oldXHROpen = window.XMLHttpRequest.prototype.open;
window.XMLHttpRequest.prototype.open = function(method, url, async, user, password) {
if(url.includes('next?rand=')) {
this.addEventListener('load', function() {
const result = JSON.parse(this.response);
indicator.textContent = `${result.ProgressPercent}%`;
});
}
return oldXHROpen.apply(this, arguments);
};
})();