Advertisement
grahamperrin

Untitled

Sep 26th, 2021
64
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None
  1. % diff google_search_date_range_shortcut-0.2.2-fx/script.js google_search_date_range_shortcut-0.2.5-fx/script.js
  2. 7,8c7,8
  3. < hdtbMenus.classList.add("hdtb-td-o");
  4. < hdtbMenus.classList.remove("hdtb-td-c","hdtb-td-h");
  5. ---
  6. > hdtbMenus.classList.add("yyoM4d");
  7. > hdtbMenus.classList.remove("p4DDCd");
  8. 11c11
  9. < const resultStats = document.getElementById("resultStats");
  10. ---
  11. > const resultStats = document.getElementById("result-stats");
  12. 74c74
  13. < return new_item.outerHTML;
  14. ---
  15. > return new_item;
  16. 120c120
  17. < const timepara = now_val.match(/qdr:([hdwmy])(\d*)$/);
  18. ---
  19. > const timepara = now_val.match(/qdr(?::|%3A)([hdwmy])(\d*)$/);
  20. 122,123c122,123
  21. < if(e.querySelectorAll("*").length > 10){
  22. < return; // 기간설정 버튼은 제외
  23. ---
  24. > if(e.querySelectorAll("*").length > 10 || e.textContent.trim() === ""){
  25. > return; // 기간설정 버튼은 제외 // 내용이 비어있는 요소도 제외
  26. 151c151,152
  27. < html_list && html_list.forEach(me=>{
  28. ---
  29. > const menu_parent = sample_menuItem.parentNode;
  30. > html_list && html_list.forEach(menuElem=>{
  31. 155a157
  32. > const list_arr = [...list];
  33. 157c159
  34. < list.forEach(e=>{
  35. ---
  36. > list_arr.some(e=>{
  37. 160,161c162,163
  38. < if(e_time < me[0]){
  39. < e.insertAdjacentHTML("beforebegin",me[1]);
  40. ---
  41. > if(e_time < menuElem[0]){
  42. > menu_parent.insertBefore(menuElem[1], e);
  43. 162a165
  44. > return true;
  45. 164c167
  46. < else if(e_time == me[0]){
  47. ---
  48. > else if(e_time == menuElem[0]){
  49. 165a169
  50. > return true;
  51. 171c175
  52. < const reverse_list = [...list].reverse();
  53. ---
  54. > const reverse_list = list_arr.reverse();
  55. 179c183
  56. < last_qdr.insertAdjacentHTML("afterend", me[1]);
  57. ---
  58. > menu_parent.insertBefore(menuElem[1], last_qdr.nextSibling);
  59. 182c186
  60. < sample_menuItem.parentNode.insertAdjacentHTML("beforeend", me[1]);
  61. ---
  62. > menu_parent.appendChild(menuElem[1]);
  63. %
  64.  
Advertisement
RAW Paste Data Copied
Advertisement