X IAFD - SEARCH TERMS REVEAL v.9 - 2023

Add the search term in the top of the results page

  1. // ==UserScript==
  2. // @name X IAFD - SEARCH TERMS REVEAL v.9 - 2023
  3. // @author janvier56
  4. // @namespace https://greasyfork.org/fr/users/7434-janvier56
  5. // @description Add the search term in the top of the results page
  6. // @version 9
  7. // @include http://www.iafd.com/results.asp?*
  8. // @include https://www.iafd.com/results.asp?*
  9. // @grant none
  10. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
  11. // @license unlicense
  12.  
  13.  
  14. // ==/UserScript==
  15. // IF you use NoScript enable : dzwnexfz53ofs.cloudfront.net
  16.  
  17. // FROM : http://stackoverflow.com/questions/540851/jquery-change-element-type-from-hidden-to-input?rq=1
  18.  
  19. $(document).ready(function(){
  20. $(".col-xs-12>form>input:first-of-type[type='hidden']").each(function(){
  21. var name = $(this).attr('name'); // grab name of original
  22. var value = $(this).attr('value'); // grab value of original
  23. /* create new visible input */
  24. var html = 'Results for : <input type="text" name="'+name+'" value="'+value+'" />';
  25.  
  26. $(this).after(html).remove(); // add new, then remove original input
  27.  
  28. $(".col-xs-12>form>input[type='text'][name='searchstring']").css({"color":"gold", "position": "fixed !important" , "top": "40px !important", "z-index":"5000 !important", "padding":"0 2px 1px" , "background-color":"black" , "font-size":"20px" , "border":"1px solid gray" , "border-radius":"10px" ,"height":"30px" , "line-height":"20px" , "text-align":"center" });
  29.  
  30.  
  31. $(".col-xs-12>h1").css({"margin-top":"0 !important" });
  32.  
  33. });
  34.  
  35. });