Skip to content

Latest commit

 

History

History
80 lines (63 loc) · 4.56 KB

TODO.md

File metadata and controls

80 lines (63 loc) · 4.56 KB

Todo for SuperGoogle.user.js

Brain dump/ideas

  • using OCR to get some text from the image
  • have a separate directory for downloading google zips
  • fix zip index, don't make the html by string, use the element APIs, cuz there are issues with undefined objects and href and those are causing issues
  • for the download function, maybe there's no need for a directory option, because you may want nested directories

notes and observations:

  • some imgs at the top don't react to showing original images, this is probably from the Google Bypass scripts
  • it seems that the part in charge of telling when an image loads is not working, all images get greyed out and they still play
  • you should reset the loaded attribute when changing the href

Todo

Refactor

Moving scripts, collecting functions into a library or an object, renaming..

  • Use Mousetrap.js instead of keyup listener

Fixes

  • ShowImages.displayImages() doesn't show some images, many images are being ignored
  • Fix: URLs seem to end with &reload=on, and this prevents ddgProxy() from working, find cause and stop it
  • Fix clickable description, it doesn't change when changing to related images
  • Fix DisplayOriginalImages
    • Make a specialized copy for the google script
    • Remove all google-specific functionality from DisplayOriginalImages, make them independent
    • Fix inconsistent "loaded" attribute
    • Make it so that ShowImages.js can be instantiated and you can choose the callbacks and how it modifies the borders and etc
  • Fix the auto-loader (clicking load next page), you can't click anything other menus because of it, use ajax instead of clicking the button itself
  • Fix: displayOriginal() doesn't work on images that don't have a type/extension
  • Fix: dlLimit slider doesn't select anything the first time it's used

New features

Polishing

Not urgent and not important

Completed

  • clean format of info.txt, add a summary part and then put the raw metadata
  • Fix info.json in zip (not being stringified)
  • Merge/combine the 3 Google mainImage scripts to make this script work independantly.
  • 2-5-2019 fix DownloadRelatedImages SuperGoogle.user.js:5009 Error while getting metaText TypeError: Cannot read property 'querySelector' of null at getMetaEl (SuperGoogle.user.js:2009)
  • Add download JSON button
  • Add index.html to zip files
  • Add a download button to the img bxs (the thumbnails)
  • Hovering over a thumbnail for a while should replace it with the original
  • modify the JSZip.prototype to include functions such as genZip(), generateIndexHtml(), ...
  • make it so that hovering over an image (while keeping the mouse perfectly still) will replace with original, rather than having it anywhere on the image
  • Migrate all the buttons and extra Google stuff from the DisplayOriginalImages script
  • Make function unionTitles(title1, title2) (has words in both but without duplicates), good for naming images using both description and title
  • Have a method that injects stuff to the imagePanels (only once at start)
  • FIX "SearchByImage" button
  • FIX the image downloading with a limit. Problem: When Images fail to load, they still count towards the download cap.
  • Add "DownloadRelatedImages" button
  • DownloadRelatedImages button doesn't get the right description for the first image
  • Make it that navigating across related images, going left (pressing Up) would take you to the last relatedImage of the previous imagePanel (instead of starting at the first one (top-left))
  • Mouse wheel scrolling will navigate through relatedImages (when the mouse is in a specific location like on the panel)
  • Make classes for the image-panels
  • Add image dimensions next to sTitle
  • Make a "Min Image size" slider that will hide images with dimensions smaller than the slider value.
  • Highlight all images that will be downloaded when sliding the downloadLimit bar.
  • Replace the "Remove failed images" button to a checkbox, also put some text like "(n)" {n being the number of images that failed to show up}.
  • Fixed issue with Google: Bypass Result Page Redirect after modifying getImgAnchors()
    Uncaught TypeError: Cannot read property 'getAttribute' of null
    at handler (eval at unsafeEval (userscript.html?id=bf35ec11-4374-4c89-97ab-a84223888460:NaN), <anonymous>:99:61)
    

Lessons learned

  • I learned that when you pass a method as a callback function, the this will be null (at least in strict mode)