User:Polygnotus/Scripts/Surveys.js: Difference between revisions

Content deleted Content added
Created page with '// Wikipedia QuickSurveys Tracker for common.js // Fetches active surveys and posts them to your userpage (function() { 'use strict'; // Configuration const QUICKSURVEYS_URL = 'https://en.wikipedia.org/w/load.php?modules=ext.quicksurveys.lib&debug=true'; const MEDIAWICK_BASE_URL = 'https://en.wikipedia.org/wiki/MediaWiki:'; // Function to extract survey data from the loaded module function extractSurveyData(moduleText) {...'
 
No edit summary
Line 188:
if (username && currentPage === `User:${username}`) {
// AddOnly a smalladd link toif it doesn't manuallyalready updateexist
if ($('#update-quicksurveys').length === 0) {
const $link = $('<span style="font-size: 0.8em; margin-left: 1em;">').html(
'[<// Add a href="#"small id="update-quicksurveys">Updatelink QuickSurveys</a>]'to manually update
const $link = $('<span style="font-size: 0.8em; margin-left: 1em;">').html(
);
'[<a href="#" id="update-quicksurveys">Update QuickSurveys</a>]'
$('#firstHeading').append($link );
$('#update-quicksurveysfirstHeading').onappend('click', function(e$link) {;
e.preventDefault();
fetchAndProcessSurveys$('#update-quicksurveys');.on('click', function(e) {
} e.preventDefault();
fetchAndProcessSurveys();
});
);}
}
});