0 - IAFD - SEARCH TERMS REVEAL v.3 - 2020

Add the search term in the top of the results page

As of 2020-10-07. See the latest version.

// ==UserScript==
// @name         0 - IAFD - SEARCH TERMS REVEAL v.3 - 2020
// @author       janvier56
// @namespace    https://greasyfork.org/fr/users/7434-janvier56
// @description  Add the search term in the top of the results page
// @version      2
// @include      http://www.iafd.com/*
// @include      https://www.iafd.com/*
// @grant           none

// IF you use NoScript enable : dzwnexfz53ofs.cloudfront.net

// FROM : http://stackoverflow.com/questions/540851/jquery-change-element-type-from-hidden-to-input?rq=1

// ==/UserScript==

$(document).ready(function(){
$(".col-xs-12>form>input:first-of-type[type='hidden']").each(function(){
  var name = $(this).attr('name'); // grab name of original
  var value = $(this).attr('value'); // grab value of original
  /* create new visible input */
  var html = 'Results for : <input type="text" name="'+name+'" value="'+value+'" />';

  $(this).after(html).remove(); // add new, then remove original input

$(".col-xs-12>form>input[type='text']").css({"color":"gold" ,"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" });

});


});