[text] print

Viewer

  1. // ==UserScript==
  2. // @name         feedback
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       Stella
  7. // @match        https://www.raterhub.com/evaluation/rater/task_results_portal/*
  8. // ==/UserScript==
  9. /* jshint esnext: true */
  10. /* jshint expr: true */ // Make JSHint shut up about short circuiting
  11. /* eslint no-undef: 0*/
  12.  
  13. // Utility function to only run when the page has actually been loaded.
  14. const domReady = cb=>{
  15.     (document.readyState === "interactive" || document.readyState === "complete") ? cb() : document.addEventListener("DOMContentLoaded", cb);
  16. };
  17.  
  18.     (function() {
  19.   'use strict';
  20.  
  21.   let puke = document.querySelectorAll('.feedback-portal-feedback-tooltip-content');
  22.   for (let a = 0; a < puke.length; a++) {
  23.     puke[a].classList.remove('feedback-portal-feedback-tooltip-content');
  24.     puke[a].style.opacity = '1';
  25.     puke[a].style.position = 'static';
  26.     puke[a].style.visibility = 'visible';
  27.   }
  28.    })();
  29.         
  30.     // This script adds a button to the page.
  31. // The button will appear at the top center of the page.
  32.  
  33.  
  34.   (function() {
  35.   // Create the print button element.
  36.   var printButton = document.createElement('button');
  37.   printButton.textContent = 'PRINT';
  38.  
  39.   // Append the print button to the document body.
  40.   document.body.appendChild(printButton);
  41.  
  42.    // create a color of the button
  43.    printButton.style.backgroundColor = '#808080';
  44.  
  45.    // Position the print button at the bottom of the document body.
  46.    printButton.style.position = 'absolute';
  47.    printButton.style.bottom = '20px';
  48.    printButton.style.left = '35%';
  49.    printButton.style.transform = 'translate(-50%, 0)';
  50.  
  51.  
  52.   // Attach an event handler to the print button.
  53.   printButton.onclick = function() {
  54.     window.print();
  55.   };
  56.   
  57.  
  58. })();

Editor

You can edit this paste and save as new:


File Description
  • print
  • Paste Code
  • 04 May-2024
  • 1.82 Kb
You can Share it: