// ==UserScript== // @name [Google/Endor] Coauthor - Are text snippets in news articles opinionated? // @namespace https://turkerview.com/mturk-scripts/ // @version 1.0 // @description Tidy up the layout only, no keybinds. // @author ChrisTurk // @include https://www.google.com/evaluation/endor* // @grant GM_log // @require https://code.jquery.com/jquery-3.3.0.min.js // ==/UserScript== if ($('body:contains(Is the above snippet part of the article body?)').length) { sanityPassed(); } function sanityPassed () { let instructionObjects = $('h3:contains(Examples)').prevAll('p, ol, h3').detach(); let exampleObjects = $('h3:contains(Task)').prevAll('table, h3').detach(); $('p:contains(Please feel free to leave any comments below:)').hide(); let instructionsContainer = `
`; let examplesContainer = ` `; $('h3:contains(Task)').before(instructionsContainer).before(examplesContainer); $('#instructionsContainer').prepend(instructionObjects); $('#examplesContainer').prepend(exampleObjects); $('body').on('click', '.toggleButton', function(){ $(this).next().toggle(); }); }