Amazon Name Hider

Just Replaces your name and address with what you set

  1. // ==UserScript==
  2. // @name Amazon Name Hider
  3. // @version 0.1
  4. // @description Just Replaces your name and address with what you set
  5. // @description This should just work on the home page, product pages, orders page, and order details pages.
  6. // @author NickTh3M4l4chi
  7. // @match https://www.amazon.com/*
  8. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  9. // @run-at document-start
  10. // @namespace https://greasyfork.org/users/582957
  11. // ==/UserScript==
  12.  
  13. var SleepTime = 1;
  14.  
  15. const ReplaceName = "No Name for you";
  16. const FakeAddress = "101 NoneYaBiz Lane‌"
  17. const FakeAddressLocal = "NonYaBizton, Fu 101011"
  18.  
  19.  
  20. var TopLeftNextToSearch = setInterval(function() {
  21. if ($('#glow-ingress-line1').length) {
  22. $('#glow-ingress-line1').text('Deliver to ' + ReplaceName);
  23. $('#glow-ingress-line2').text(FakeAddressLocal);
  24. clearInterval(TopLeftNextToSearch);
  25. }
  26. }, SleepTime);
  27.  
  28. var ProductPageRightSide = setInterval(function() {
  29. if ($(document.querySelector("#contextualIngressPtLabel_deliveryShortLine > span:nth-child(1)")).length) {
  30. $(document.querySelector("#contextualIngressPtLabel_deliveryShortLine > span:nth-child(1)")).text('Deliver to ' + ReplaceName + ' -');
  31. $(document.querySelector("#contextualIngressPtLabel_deliveryShortLine > span:nth-child(2)")).text(FakeAddressLocal);
  32. clearInterval(ProductPageRightSide);
  33. }
  34. }, SleepTime);
  35.  
  36. var OrdersPageMain = setInterval(function() {
  37. if ($(".a-popover-trigger.a-declarative.insert-encrypted-trigger-text").length) {
  38. $(".a-popover-trigger.a-declarative.insert-encrypted-trigger-text").text(ReplaceName);
  39. const OrdersPageMainWorking = 1;
  40. }
  41. if ($(".trigger-text").length) {
  42. $(".trigger-text").text(ReplaceName);
  43. const OrdersPageMainWorking = 1;
  44. }
  45. }, SleepTime);
  46.  
  47.  
  48. var OrdersPopup = setInterval(function() {
  49. if ($("[id^=a-popover-content-] > span > div:nth-child(1) > span").length) {
  50. $("[id^=a-popover-content-] > span > div:nth-child(1) > span").text(ReplaceName);
  51. $("[id^=a-popover-content-] > span > div:nth-child(2)").text(FakeAddress);
  52. const OrdersPopupWorking = 1;
  53. }
  54. if ($("[id^=a-popover-content-] > div > div > ul > li.displayAddressLI.displayAddressFullName").length) {
  55. $("[id^=a-popover-content-] > div > div > ul > li.displayAddressLI.displayAddressFullName").text(ReplaceName);
  56. $("[id^=a-popover-content-] > div > div > ul > li.displayAddressLI.displayAddressAddressLine1").text(FakeAddress);
  57. $("[id^=a-popover-content-] > div > div > ul > li.displayAddressLI.displayAddressCityStateOrRegionPostalCode").text(FakeAddressLocal);
  58. $("[id^=a-popover-content-] > div > div > ul > li.displayAddressLI.displayAddressPhoneNumber").remove();
  59. const OrdersPopupWorking = 1;
  60. }
  61. }, SleepTime);
  62.  
  63. var OrderDetailsPage = setInterval(function() {
  64. if ($("#orderDetails > div.a-box-group.a-spacing-base > div.a-box.a-first > div > div > div > div.a-fixed-right-grid-col.a-col-left > div > div.a-column.a-span5 > div.a-section.a-spacing-none.od-shipping-address-container > div > div > ul > li.displayAddressLI.displayAddressFullName").length) {
  65. $("#orderDetails > div.a-box-group.a-spacing-base > div.a-box.a-first > div > div > div > div.a-fixed-right-grid-col.a-col-left > div > div.a-column.a-span5 > div.a-section.a-spacing-none.od-shipping-address-container > div > div > ul > li.displayAddressLI.displayAddressFullName").text(ReplaceName);
  66. $("#orderDetails > div.a-box-group.a-spacing-base > div.a-box.a-first > div > div > div > div.a-fixed-right-grid-col.a-col-left > div > div.a-column.a-span5 > div.a-section.a-spacing-none.od-shipping-address-container > div > div > ul > li.displayAddressLI.displayAddressAddressLine1").text(FakeAddress);
  67. $("#orderDetails > div.a-box-group.a-spacing-base > div.a-box.a-first > div > div > div > div.a-fixed-right-grid-col.a-col-left > div > div.a-column.a-span5 > div.a-section.a-spacing-none.od-shipping-address-container > div > div > ul > li.displayAddressLI.displayAddressCityStateOrRegionPostalCode").text(FakeAddressLocal);
  68. const OrderDetailsPageWorking = 1;
  69. }
  70. }, SleepTime);
  71.  
  72. var KillLoopsNotInUse = setInterval(function() {
  73. clearInterval(TopLeftNextToSearch);
  74. clearInterval(ProductPageRightSie);
  75.  
  76. if(OrdersPageMainWorking !== 1) {
  77. clearInterval(OrdersPageMain);
  78. console.log('OrdersPageMain killed');
  79. }
  80. if(OrdersPopupWorking !== 1) {
  81. clearInterval(OrdersPopup);
  82. console.log('OrdersPopup killed');
  83. }
  84. if(OrderDetailsPageWorking !== 1) {
  85. clearInterval(OrderDetailsPage);
  86. console.log('OrderDetailsPage killed');
  87. }
  88. }, 2000);