Convert Email Address to Duckduckgo Anonymous email format

Converts an email to duckgo anonymous email format, now with minimize functionality

目前为 2025-03-03 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Convert Email Address to Duckduckgo Anonymous email format
  3. // @namespace http://tampermonkey.net/
  4. // @author aspen138
  5. // @version 1.1.2
  6. // @description Converts an email to duckgo anonymous email format, now with minimize functionality
  7. // @match https://126.com/*
  8. // @match https://163.com/*
  9. // @match https://abv.bg/*
  10. // @match https://adelphia.net/*
  11. // @match https://aim.com/*
  12. // @match https://alice.it/*
  13. // @match https://aol.com/*
  14. // @match https://att.net/*
  15. // @match https://bellsouth.net/*
  16. // @match https://bigpond.com/*
  17. // @match https://bluewin.ch/*
  18. // @match https://blueyonder.co.uk/*
  19. // @match https://bol.com.br/*
  20. // @match https://btinternet.com/*
  21. // @match https://charter.net/*
  22. // @match https://comcast.net/*
  23. // @match https://cox.net/*
  24. // @match https://cs.com/*
  25. // @match https://earthlink.net/*
  26. // @match https://email.mail.com/*
  27. // @match https://embarqmail.com/*
  28. // @match https://excite.com/*
  29. // @match https://exmail.qq.com/*
  30. // @match https://fastmail.com/*
  31. // @match https://free.fr/*
  32. // @match https://frontiernet.net/*
  33. // @match https://ge.com/*
  34. // @match https://gmail.com/*
  35. // @match https://gmx.com/*
  36. // @match https://hetnet.nl/*
  37. // @match https://home.nl/*
  38. // @match https://hp.com/*
  39. // @match https://icloud.com/mail/*
  40. // @match https://ig.com.br/*
  41. // @match https://insightbb.co/*
  42. // @match https://juno.com/*
  43. // @match https://laposte.net/*
  44. // @match https://libero.it/*
  45. // @match https://mac.com/*
  46. // @match https://mail.126.com/*
  47. // @match https://mail.163.com/*
  48. // @match https://mail.apple.com/*
  49. // @match https://mail.aol.com/*
  50. // @match https://mail.fastmail.com/*
  51. // @match https://mail.gmx.com/*
  52. // @match https://mail.google.com/*
  53. // @match https://mail.proton.me/*
  54. // @match https://mail.qq.com/*
  55. // @match https://mail.ru/*
  56. // @match https://mail.sina.com/*
  57. // @match https://mail.sina.com.cn/*
  58. // @match https://mail.yahoo.com/*
  59. // @match https://mail.yandex.com/*
  60. // @match https://mail.zoho.com/*
  61. // @match https://mchsi.com/*
  62. // @match https://me.com/*
  63. // @match https://mindspring.com/*
  64. // @match https://msn.com/*
  65. // @match https://netscape.net/*
  66. // @match https://netzero.com/*
  67. // @match https://netzero.net/*
  68. // @match https://ntlworld.com/*
  69. // @match https://optonline.net/*
  70. // @match https://optusnet.com.au/*
  71. // @match https://orange.fr/*
  72. // @match https://outlook.com/*
  73. // @match https://outlook.live.com/*
  74. // @match https://pacbell.net/*
  75. // @match https://peoplepc.com/*
  76. // @match https://planet.nl/*
  77. // @match https://prodigy.net/*
  78. // @match https://proton.me/*
  79. // @match https://q.com/*
  80. // @match https://qq.com/*
  81. // @match https://rediffmail.com/*
  82. // @match https://roadrunner.com/*
  83. // @match https://rogers.com/*
  84. // @match https://sbcglobal.net/*
  85. // @match https://shaw.ca/*
  86. // @match https://sky.com/*
  87. // @match https://skynet.be/*
  88. // @match https://sympatico.ca/*
  89. // @match https://t-online.de/*
  90. // @match https://talktalk.net/*
  91. // @match https://telenet.be/*
  92. // @match https://telus.net/*
  93. // @match https://terra.com.br/*
  94. // @match https://tiscali.co.uk/*
  95. // @match https://tiscali.it/*
  96. // @match https://trainingelite.com/*
  97. // @match https://uol.com.br/*
  98. // @match https://us.army.mil/*
  99. // @match https://verizon.net/*
  100. // @match https://videotron.ca/*
  101. // @match https://virgilio.it/*
  102. // @match https://wanadoo.fr/*
  103. // @match https://web.de/*
  104. // @match https://webtv.net/*
  105. // @match https://windstream.net/*
  106. // @match https://wp.pl/*
  107. // @match https://www.126.com/*
  108. // @match https://www.163.com/*
  109. // @match https://www.mail.com/*
  110. // @match https://xtra.co.nz/*
  111. // @match https://yahoo.ca/*
  112. // @match https://yahoo.co.id/*
  113. // @match https://yahoo.co.in/*
  114. // @match https://yahoo.co.uk/*
  115. // @match https://yahoo.com/*
  116. // @match https://yahoo.com.ar/*
  117. // @match https://yahoo.com.au/*
  118. // @match https://yahoo.com.br/*
  119. // @match https://yahoo.com.cn/*
  120. // @match https://yahoo.com.mx/*
  121. // @match https://yahoo.com.sg/*
  122. // @match https://yahoo.com/mail/*
  123. // @match https://yahoo.de/*
  124. // @match https://yahoo.es/*
  125. // @match https://yahoo.fr/*
  126. // @match https://yahoo.in/*
  127. // @match https://yahoo.it/*
  128. // @match https://ymail.com/*
  129. // @match https://yandex.com/mail/*
  130. // @match https://yandex.ru/*
  131. // @match https://zoho.com/mail/*
  132. // @icon data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMTI4IDEyOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBmaWxsPSIjZGU1ODMzIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02NCAxMjhjMzUuMzQ2IDAgNjQtMjguNjU0IDY0LTY0IDAtMzUuMzQ2LTI4LjY1NC02NC02NC02NFMwIDI4LjY1NCAwIDY0YzAgMzUuMzQ2IDI4LjY1NCA2NCA2NCA2NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPgogIDxwYXRoIGZpbGw9IiNkZGQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTczIDExMS43NWMwLS41LjEyMy0uNjE0LTEuNDY3LTMuNzgyLTQuMjI0LTguNDU5LTguNDY5LTIwLjM4NC02LjUzOC0yOC4wNzUuMzUyLTEuMzk3LTMuOTc5LTUxLjc0NC03LjA0LTUzLjM2NS0zLjQwMy0xLjgxMy03LjU5LTQuNjktMTEuNDE5LTUuMzMtMS45NDMtLjMxLTQuNDktLjE2NC02LjQ4Mi4xMDUtLjM1NC4wNDctLjM2OC42ODQtLjAzLjc5OCAxLjMwNy40NDMgMi44OTUgMS4yMTIgMy44MyAyLjM3NS4xNzguMjItLjA2LjU2Ni0uMzQyLjU3Ny0uODgyLjAzMi0yLjQ4Mi40MDItNC41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uMDQ3IDEuMDQ3IDAgMCAwIDIuMDk3IDB6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz4KICA8L2c+CiAgPHBhdGggZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNjQgMTE3Ljc1YzI5LjY4NSAwIDUzLjc1LTI0LjA2NSA1My43NS01My43NVM5My42ODUgMTAuMjUgNjQgMTAuMjUgMTAuMjUgMzQuMzE1IDEwLjI1IDY0IDM0LjMxNSAxMTcuNzUgNjQgMTE3Ljc1em0wIDVjMzIuNDQ3IDAgNTguNzUtMjYuMzAzIDU4Ljc1LTU4Ljc1Uzk2LjQ0NyA1LjI1IDY0IDUuMjUgNS4yNSAzMS41NTMgNS4yNSA2NCAzMS41NTMgMTIyLjc1IDY0IDEyMi43NXoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K
  133. // @iconbackup https://ssl.gstatic.com/ui/v1/icons/mail/rfr/gmail.ico
  134. // @license MIT
  135. // @grant GM_getValue
  136. // @grant GM_setValue
  137. // ==/UserScript==
  138.  
  139. (function() {
  140. 'use strict';
  141.  
  142. // Retrieve a stored value for demonstration (not essential for minimizing logic)
  143. const testStoredSendTo = GM_getValue('whatever', '');
  144. console.log("testStoredSendTo", testStoredSendTo);
  145.  
  146. // Create a container for the floating box
  147. const container = document.createElement('div');
  148. container.style.position = 'fixed';
  149. container.style.bottom = '20px';
  150. container.style.left = '20px';
  151. container.style.zIndex = '9999';
  152. container.style.padding = '10px';
  153. container.style.backgroundColor = '#fff';
  154. container.style.border = '1px solid #ccc';
  155. container.style.borderRadius = '5px';
  156. container.style.boxShadow = '0 0 5px rgba(0,0,0,0.3)';
  157. container.style.fontFamily = 'Arial, sans-serif';
  158. container.style.maxWidth = '280px';
  159.  
  160. // Title or heading
  161. const heading = document.createElement('h4');
  162. heading.textContent = 'Email Converter';
  163. heading.style.margin = '0 0 10px 0';
  164. container.appendChild(heading);
  165.  
  166. // Close (minimize) button
  167. const minimizeButton = document.createElement('button');
  168. minimizeButton.textContent = 'X';
  169. minimizeButton.style.position = 'absolute';
  170. minimizeButton.style.top = '5px';
  171. minimizeButton.style.right = '10px';
  172. minimizeButton.style.cursor = 'pointer';
  173. minimizeButton.style.border = 'none';
  174. minimizeButton.style.background = 'none';
  175. minimizeButton.style.fontSize = '16px';
  176. container.appendChild(minimizeButton);
  177.  
  178. // This button will appear when the container is minimized
  179. const restoreButton = document.createElement('button');
  180. restoreButton.textContent = 'Email Converter';
  181. restoreButton.style.position = 'fixed';
  182. restoreButton.style.left = '0';
  183. restoreButton.style.bottom = '20px';
  184. restoreButton.style.zIndex = '9999';
  185. restoreButton.style.padding = '6px 12px';
  186. restoreButton.style.cursor = 'pointer';
  187. restoreButton.style.border = '1px solid #ccc';
  188. restoreButton.style.borderRadius = '5px';
  189. restoreButton.style.fontFamily = 'Arial, sans-serif';
  190. restoreButton.style.backgroundColor = '#fff';
  191. restoreButton.style.boxShadow = '0 0 5px rgba(0,0,0,0.3)';
  192. // Initially hidden
  193. // restoreButton.style.display = 'none';
  194. container.style.display = 'none';
  195. restoreButton.style.display = 'block';
  196. document.body.appendChild(restoreButton);
  197.  
  198. // When the user clicks the "X", hide the container and show the restore button
  199. minimizeButton.addEventListener('click', () => {
  200. container.style.display = 'none';
  201. restoreButton.style.display = 'block';
  202. });
  203.  
  204. // When the user clicks restore, show the container and hide the restore button
  205. restoreButton.addEventListener('click', () => {
  206. container.style.display = 'block';
  207. restoreButton.style.display = 'none';
  208. });
  209.  
  210. // Wrapper to neatly organize form elements
  211. const formWrapper = document.createElement('div');
  212. formWrapper.style.display = 'flex';
  213. formWrapper.style.flexDirection = 'column';
  214. formWrapper.style.gap = '5px';
  215.  
  216. // Retrieve stored values (if any)
  217. const storedSendTo = GM_getValue('converterSendTo', '');
  218. const storedDdgo = GM_getValue('converterDdgo', '');
  219.  
  220. // Label and input for "send email to who?"
  221. const labelSendTo = document.createElement('label');
  222. labelSendTo.textContent = 'Send email to who: ';
  223. labelSendTo.style.marginRight = '10px';
  224.  
  225. const inputSendTo = document.createElement('input');
  226. inputSendTo.type = 'text';
  227. inputSendTo.placeholder = 'e.g. 123@qq.com';
  228. inputSendTo.style.width = '250px';
  229. inputSendTo.value = storedSendTo;
  230.  
  231. const rowSendTo = document.createElement('div');
  232. rowSendTo.appendChild(labelSendTo);
  233. rowSendTo.appendChild(inputSendTo);
  234.  
  235. // Label and input for "your ddgo mail?"
  236. const labelDdgo = document.createElement('label');
  237. labelDdgo.textContent = 'Your DuckduckGo address: ';
  238. labelDdgo.style.marginRight = '10px';
  239.  
  240. const inputDdgo = document.createElement('input');
  241. inputDdgo.type = 'text';
  242. inputDdgo.placeholder = 'e.g. dd@duck.com';
  243. inputDdgo.style.width = '250px';
  244. inputDdgo.value = storedDdgo;
  245.  
  246. const rowDdgo = document.createElement('div');
  247. rowDdgo.appendChild(labelDdgo);
  248. rowDdgo.appendChild(inputDdgo);
  249.  
  250. // Convert button
  251. const buttonConvert = document.createElement('button');
  252. buttonConvert.textContent = 'Convert';
  253. buttonConvert.style.marginRight = '10px';
  254. buttonConvert.style.cursor = 'pointer';
  255. buttonConvert.style.width = '250px';
  256.  
  257. // Output field for converted email
  258. const labelOutput = document.createElement('label');
  259. labelOutput.textContent = 'Converted: ';
  260. labelOutput.style.marginRight = '10px';
  261.  
  262. const outputEmail = document.createElement('input');
  263. outputEmail.type = 'text';
  264. outputEmail.readOnly = true;
  265. outputEmail.style.width = '250px';
  266.  
  267. const rowOutput = document.createElement('div');
  268. rowOutput.appendChild(labelOutput);
  269. rowOutput.appendChild(outputEmail);
  270.  
  271. // Feedback or error message area
  272. const feedback = document.createElement('p');
  273. feedback.style.color = 'red';
  274. feedback.style.fontSize = '14px';
  275. feedback.style.margin = '5px 0 0 0';
  276. feedback.style.minHeight = '18px';
  277. feedback.textContent = '';
  278.  
  279. // Conversion function
  280. buttonConvert.addEventListener('click', () => {
  281. const originalEmail = inputSendTo.value.trim();
  282. const ddgoEmail = inputDdgo.value.trim();
  283. let errorMessage = '';
  284.  
  285. // Simple validations
  286. if (!originalEmail) {
  287. errorMessage = 'Please enter an email address to convert.';
  288. } else if (!ddgoEmail) {
  289. errorMessage = 'Please enter your DDG address.';
  290. }
  291.  
  292. // Handle any errors
  293. if (errorMessage) {
  294. feedback.textContent = errorMessage;
  295. outputEmail.value = '';
  296. return;
  297. }
  298.  
  299. // Replace '@' with '_at_' and append the ddgo email
  300. const converted = originalEmail.replace(/@/g, '_at_') + '_' + ddgoEmail;
  301. outputEmail.value = converted;
  302. feedback.textContent = '';
  303.  
  304. // Save inputs to Tampermonkey storage
  305. GM_setValue('converterSendTo', originalEmail);
  306. GM_setValue('converterDdgo', ddgoEmail);
  307. });
  308.  
  309. // Assemble elements in the container
  310. formWrapper.appendChild(rowSendTo);
  311. formWrapper.appendChild(rowDdgo);
  312. formWrapper.appendChild(buttonConvert);
  313. formWrapper.appendChild(rowOutput);
  314. formWrapper.appendChild(feedback);
  315.  
  316. container.appendChild(formWrapper);
  317.  
  318. // Finally, attach the container to document body
  319. document.body.appendChild(container);
  320. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址