Giter Site home page Giter Site logo

sonicmax / chromell-2.0 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pokemans/chromell-2.0

5.0 5.0 2.0 14.21 MB

ChromeLL 2.0 - rewrite to modularize code, improve backend, include new or possibly experimental APIs

JavaScript 80.85% HTML 10.96% CSS 7.69% Makefile 0.50%

chromell-2.0's People

Contributors

20geomine avatar chairface avatar myopicmage avatar pokemans avatar pth0rn avatar skburgart avatar sonicmax avatar tdaddy-evie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

at89 seiru

chromell-2.0's Issues

Improve like button feature

  • provide a variety of templates via a menu (maybe using hoverIntent)
  • add the option to use custom images & custom templates

Improve options page

  • add tooltips where the feature isn't self-explanatory
  • allow user to save/restore local backup of config settings
  • make better use of space by splitting the message list/topic list/etc menus into more specific groups (so that user doesn't have to scroll)

2.4 changelog

(Note: crossed out changes were present in codebase prior to the revert - see #56 for more info)

New features

  • Imgur embedding
  • Chrome Sync
  • Ability to rename images before transloading
  • Clicking "Anonymous token" checkbox will remove signature
  • 'Endless ETI' (beta)

Performance related

  • Imagemap search feature uses IndexedDB for storage

UI related

  • User info popup colours match ETI colour scheme
  • Options menu UI updated
  • Wolf picture appears above dramalinks ticker (if enabled)

Bug fixes/misc

  • Youtube videos can be watched in fullscreen mode
  • Imagemap 'Back to topic' link takes you back to correct page
  • Fixed bug with quoted message markup when generating like button output
  • Fixed bug with Gfycat embedding when using HTTPS
  • Fixed archive quoting

Save generated CSS for later use

It might be faster to inject a pregenerated CSS file containing highlights/etc instead of generating it each time a page is loaded

to-do list for 2.0.151

Mostly bugfixes and small updates:

  • doublecheck that unread post count behaves properly in fast moving topics
  • make sure that youtube embedding is robust when user specifies a start time
  • add conditional to pm_notify to check whether userbar exists before attaching mutation observer

(adding pm_notify in next update)

Implement Chrome Sync feature

chairface did most of the legwork for this already - just need to figure out why this wasn't enabled in ChromeLL.

ETI Bash integration

User should be able to select multiple single posts, or a single post containing nested quotes. User should also be able to highlight text and send via context menu. i think this would cover most use cases

The handleBash function pushes each username & message into an array, and scrapes the message URL (either from message detail, or creating a link similar to the 'jump-arrow' links). submitBash formats the arrays for ETI Bash and sends a POST request using formData.

Refactor Chrome API calls

For example, instead of directly using the chrome.runtime APIs for message passing, we should assign the API methods to variables somewhere and use those instead.

This would greatly simplify the process of porting ChromeLL to other browsers, because we could replace the API calls all at once, instead of having to through the whole codebase to find each individual API call. It would also tidy up the code a bit.

version 2.30 bugs

  • some weird behaviour with the browser back button
  • post title notifications arent updating correctly for new pages
  • highlighted user notifications display username twice
    099f845
  • filter me button doesnt display in archived topics
    9fc5b1a
  • ignorator indexing is inaccurate

fix dramalinks message passing

if you open a tag in a new window , the dramalinks ticker will stay at "dramalinks loading..." because it only passes the message to the active window.

Handle CORS from within ChromeLL

(instead of using cors-anywhere)

Seems like it should be possible to modify the request headers in-flight using the webRequest API

Page appears to hang while waiting for dramalinks XHR to complete

Only affects the extension while waiting for the update_drama action - using cached data, the ticker is appended to the document almost instantaneously

I think the easiest way to fix this would to rewrite it to always return the last cached dramalinks scrape (if it exists) & remove the update_drama action. if dramalinks ticker changes, it can be loaded on the next page refresh.

Use MutationObserver to apply DOM modifications as HTML is parsed

for example, we can listen for changes to the childlist/subtree, and use addedNodes property to figure out which elements have been parsed. this will allow us to call all of the messageList/topicList functions before DOMContentLoaded has fired.

this will require organising the functions by the elements that they modify - i think the best method would be to use the element className property to organise the functions.

Improve performance of messageList.js

Currently the messageListHelper.init function is called, which then loops through each function in the messageList object (checking whether the config setting is true), and then many of the functions in the messageList object have to loop through every single post (or at least elements on the page that exist in every post) to perform DOM modifications - instead we should send individual posts to each function, which would cut down the processing time.

Move external scripts into messageList.js

It would make more sense if the post template & like button scripts were included in the messageList object (instead of appending them to the document head)

It would also allow us to use event.preventDefault() to stop the hashmark & fragment identifier from being added to the URL in address bar.

Refactor using module pattern

This will be easier to maintain and extend, and gives us more control over scope

Completed:

  • messageList (ada0ffd)
  • allPages
  • topicList
  • background

To-do:

  • allBg
  • imagemap
  • bash
  • (possibly more)

embed gfycat thumbnails in quoted posts

with similar "click to expand" behaviour that you see in quoted gifs

seems like the thumbnails can be accessed via these URLs:

https://thumbs.gfycat.com/AdjectiveAdjectiveAnimal-thumb100.jpg
https://thumbs.gfycat.com/AdjectiveAdjectiveAnimal-poster.jpg

it would probably be better to use the latter form. we can query the api, scale the thumbnail (or at least centre it within a canvas that's equivalent to the video size) and attach a click listener to embed the actual video.

to-do list for 2.0.15

  • make sure that only visible Gfycat videos are playing - this will greatly lessen CPU load in topics with large numbers of Gfycat links
  • pause all Gfycat videos in inactive tabs
  • test snippets
  • test archive quoting
  • remove "show in popup" option from the autoscroll menu
  • double check that the topicList/messageList functions work correctly in PM inbox/history.php

Improve performance of topicList.js

i've already incorporated some of the changes from #3 - at this point i should focus on separating the init function into the parts that can be executed immediately, and the parts that need to wait for the DOMContentLoaded event to fire

Userpics integration

  • Display userpic thumbnails from tiko's website on right edge of message elements (see ea1dc8b)
  • Provide different options for userpic display (eg display on hover)
  • Click to expand userpic thumbnails
  • Allow users to view, upload and possibly delete their userpics from ChromeLL options page

Cache XHR responses to improve performance

This will be particularly helpful for Gfycat/Imgur/4chan API calls, as we can reasonably expect the response to be the same each time. This will also help to avoid issues with rate limiting (particularly for the Imgur API, as rate limiting is attached to a single client ID; and for 4Chan, as we are limited to 1 request per second)

Dramalinks ajax should be cached for 30 minutes.

User info lookups should probably not be cached, so that account status is accurate - however, the account rep will only change once a day. If xhr takes too long (ie if https://github.com/xdvsx/ChromeLL-2.0/issues/31 occurs) then we could attempt to retrieve it from cache instead.

Error in Gfycat embed feature when using HTTPS

Problem: URL protocol for Gfycat video contains extra character ("httpss" instead of "https"). This only affects web store version - must've inadvertently done something to fix this in dev version.

Leaving this open until web store version has been updated

refactor gfycat functions, hide NSFW videos

I should refactor the api stuff into a different function

I can check the API response for the NSFW flag, and if it doesn't exist, check the post (just in case). I won't do this in NWS tagged topics

youtube embed isnt detecting start times correctly

doesn't account for this pattern - "#t=119"

this is the format that youtube gives you if you use "get video URL at current time".

wondering whether the best way to handle this would be to use a separate rule for this format - eg if the timecode doesn't contain h|m|s, and it follows the "#t=" format, then we should assume that it's already in seconds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.