Reverso Context Script

Removes the blur and registration notice from the bottom results on context.reverso.net. Note: it does not give access to more results than are on the page.

  1. // ==UserScript==
  2. // @name Reverso Context Script
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Removes the blur and registration notice from the bottom results on context.reverso.net. Note: it does not give access to more results than are on the page.
  6. // @author Cocconator
  7. // @match https://context.reverso.net/*/*/*
  8. // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
  9. // @grant aGM_addStyle
  10. // ==/UserScript==
  11.  
  12. function waitForKeyElements (
  13. selectorTxt,
  14. actionFunction,
  15. bWaitOnce,
  16. iframeSelector
  17. ) {
  18. var targetNodes, btargetsFound;
  19.  
  20. if (typeof iframeSelector == "undefined") targetNodes = $(selectorTxt);
  21. else targetNodes = $(iframeSelector).contents () .find (selectorTxt);
  22. if (targetNodes && targetNodes.length > 0) {
  23. btargetsFound = true;
  24. targetNodes.each ( function () {
  25. var jThis = $(this);
  26. var alreadyFound = jThis.data ('alreadyFound') || false;
  27.  
  28. if (!alreadyFound) {
  29. var cancelFound = actionFunction (jThis);
  30. if (cancelFound) btargetsFound = false;
  31. else jThis.data ('alreadyFound', true);
  32. }
  33. } );
  34. }
  35. else {
  36. btargetsFound = false;
  37. }
  38.  
  39. var controlObj = waitForKeyElements.controlObj || {};
  40. var controlKey = selectorTxt.replace (/[^\w]/g, "_");
  41. var timeControl = controlObj [controlKey];
  42.  
  43. if (btargetsFound && bWaitOnce && timeControl) {
  44. clearInterval (timeControl);
  45. delete controlObj [controlKey]
  46. }
  47. else {
  48. if ( ! timeControl) {
  49. timeControl = setInterval ( function () {
  50. waitForKeyElements ( selectorTxt,
  51. actionFunction,
  52. bWaitOnce,
  53. iframeSelector
  54. );
  55. },
  56. 300
  57. );
  58. controlObj [controlKey] = timeControl;
  59. }
  60. }
  61. waitForKeyElements.controlObj = controlObj;
  62. }
  63.  
  64. waitForKeyElements (".example.blocked", removeDSclass);
  65.  
  66. function removeDSclass (jNode) {
  67. console.log ("Cleaned node: ", jNode);
  68. jNode.removeClass ("blocked");
  69. }
  70.  
  71. (function() {
  72. 'use strict';
  73. document.querySelector('#blocked-results-banner').remove();
  74. })();