rule34 search modify

convenience, adding this search prompt to every search

  1. // ==UserScript==
  2. // @name rule34 search modify
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description convenience, adding this search prompt to every search
  6. // @author reflexpunch
  7. // @match *://rule34.xxx/index.php*
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // @grant none
  10. // @license GPL
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. let first = "dark-skinned_male ~ dark-skinned_futanari ~ queen_of_spades ~ queen_of_spades_symbol ~ qos ~ spade_choker ~ spade_tattoo ~ blacked_clothing ~ cuckold ~ blacked ~ bbc"
  16. let second = "camera_view ~ recording ~ snapchat ~ phone ~ phone_screen ~ cellphone ~ video_call ~ mirror_selfie ~ mirror ~ posing ~ magazine_cover ~ straight ~ female ~ shortstack ~ elf ~ smaller_female ~ muscular_female ~ muscular ~ living_sex_toy ~ vaginal_penetration ~ blowjob ~ deepthroat ~ anal ~ anal_sex ~ vaginal ~ double_penetration ~ rape ~ feet ~ 1girl ~ interracial ~ very_dark_skin ~ raceplay ~ interspecies ~ seductive_eyes ~ seductive_mouth ~ grin ~ smile ~ disappointed ~ disgusted ~ disinterested ~ netorare ~ betrayal ~ caught ~ caught_in_the_act ~ handsfree_ejaculation ~ small_penis_humiliation ~ wasted_cum ~ infidelity ~ jerking ~ jerkingoff ~ watching ~ watching_porn ~ watching_sex ~ forced_to_watch ~ implied_sex ~ side_view ~ voyeur ~ voyeur_pov ~ voyeurism ~ light-skinned_femboy ~ comparing ~ two-finger_handjob ~ pinching_gesture ~ sph ~ big_penis_adoration ~ penis_size_difference ~ sissy ~ chastity_cage ~ tiny ~ watching ~ cuckold_pov ~ cuckold_masturbating ~ cuckold_meal ~ cum_on_cuckold ~ creampie_eating ~ cum_cleanup ~ friendly_fire ~ eating_cum ~ flat_chastity_cage ~ rimming ~ rimming_male ~ rimjob ~ anilingus ~ caption ~ social_media ~ prostate_stimulation ~ prostate_milking ~ prostate ~ spade_choker ~ answering_door ~ cheating_wife ~ cheating ~ tricked ~ walk-in ~ cheating_girlfriend ~ blonde_hair ~ handholding ~ heart-shaped_pupils ~ used_condom ~ pornhub_bra ~ spade_(shape) ~ tattoo ~ tattoos ~ pubic_tattoo ~ womb_tattoo ~ body_writing ~ legs_wrapped_around_partner ~ kissing ~ kissing_while_penetrated ~ french_kissing ~ french_kiss ~ making_out ~ femsub ~ penis_awe ~ 2koma ~ imminent_sex ~ before_and_after ~ pregnant ~ after_sex ~ before_sex ~ fucked_senseless ~ fucked_silly ~ rolling_eyes ~ ahegao ~ mating_press ~ leg_lock ~ stand_and_carry_position ~ groping ~ grabbing ~ hand_on_ass ~ humiliation ~ masochism ~ older_man_and_teenage_girl ~ kissing_lover_while_cheating ~ dialogue ~ hmv ~ edit ~ text ~ english_text ~ third-party_edit "
  17. let third = "-bleached -queen_of_hearts -bleached_clothing -dark-skinned_femboy"
  18. //let newpart = `( ${first.trim()} ) ( ${second.trim()} ) ${third.trim()}`
  19. let newpart = `( ${first.trim()} ) ${third.trim()}`
  20. //let newpart = "( gay ~ yaoi ~ femboy ~ trap ) -straight"
  21. //let newpart = "rating:safe"
  22. let linkpart = newpart.split(' ').join('+')
  23.  
  24. function modifyLinks() {
  25. var links = document.querySelectorAll('a'); // Select all links on the page
  26. links.forEach(function(link) {
  27. var currentHref = link.getAttribute('href');
  28. if (currentHref == "https://rule34.xxx/index.php?page=post&s=list&tags=all"){
  29. link.setAttribute('href', "https://rule34.xxx/index.php?page=post&s=list&tags=" + linkpart);
  30. }
  31. if (currentHref.startsWith("index.php?page=post&s=list&tags=")) {
  32. link.setAttribute('href', currentHref +"+"+ linkpart); // Add custom part to the end of the link
  33. }
  34. });
  35. }
  36. function modifyInput(input) {
  37. return input.toUpperCase(); // Example: Convert the input to uppercase
  38. }
  39. function findSearch(){
  40. var inputbox = document.querySelector('.awesomplete'); // Adjust the selector as per the site's search form
  41. return inputbox.querySelector('input[type="text"]'); // Adjust the selector as per the site's search form
  42. }
  43. function modifySearchURL() {
  44. var searchForm = findSearch()
  45. if (searchForm) {
  46. searchForm.addEventListener('keypress', function(e) {
  47. if (e.keyCode === 13) { // Check if the Enter key is pressed
  48. if(!searchForm.value.trim().endsWith(newpart)){
  49. searchForm.value = searchForm.value +" "+ newpart
  50. }
  51. //searchForm.setAttribute('action', currentAction +"+"+ newpart); // Modify the search URL
  52. }
  53. });
  54. }
  55. }
  56.  
  57. function cleanAtStart(){
  58. var searchForm = findSearch()
  59. searchForm.value = searchForm.value.substring( 0, searchForm.value.indexOf(newpart) );
  60. }
  61. modifyLinks();
  62. modifySearchURL();
  63. cleanAtStart();
  64.  
  65.  
  66. })();