sonicmax / chromell-2.0 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from pokemans/chromell-2.0
ChromeLL 2.0 - rewrite to modularize code, improve backend, include new or possibly experimental APIs
This project forked from pokemans/chromell-2.0
ChromeLL 2.0 - rewrite to modularize code, improve backend, include new or possibly experimental APIs
I should clean up the code before I try to fix any of the bugs
The user should be able to hover over an anchor tag to view the full list. This should be implemented as an optional feature.
We could use localStorage to save the thumbnails as base64 encoded strings, along with their url & filename
shouldn't be too hard to fix
so people could type something like
cll tag query
to search a specified tag for" query"
need to add a mutation observer and a melon wolf detector
(Note: crossed out changes were present in codebase prior to the revert - see #56 for more info)
New features
Performance related
UI related
Bug fixes/misc
It might be faster to inject a pregenerated CSS file containing highlights/etc instead of generating it each time a page is loaded
Mostly bugfixes and small updates:
(adding pm_notify in next update)
chairface did most of the legwork for this already - just need to figure out why this wasn't enabled in ChromeLL.
for future reference: http://pieroxy.net/blog/pages/lz-string/index.html
not a huge issue, as the chrome.storage api gives us unlimited space - but might be worth implementing if it isn't detrimental to performance
We just have to remove the port number from the URL. Something seems strange about this. Adding [Unsolved Mysteries]
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.
popup doesn't display info if only keywords are ignorated - we need to account for this in the popup.js conditionals
seems to be related to the chrome.tabs.onActivated listener in background.js
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.
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.
First thing to do is complete #39
this will star a topic - http://boards.endoftheinter.net/ajax.php?r=1&t=topicnumber
i can't really check whether the topic has been starred before attempting to star it - but i can keep track of this in chromeLL and prevent user from making repeat requests
i would also have to add some kind of rate limiting
https://developer.chrome.com/extensions/event_pages
https://developer.chrome.com/extensions/event_pages#transition
"Event pages are available in the stable channel as of Chrome 22, and the performance advantages are significant, especially on low-power devices."
it would make them more readable & easier to maintain
(instead of using cors-anywhere)
Seems like it should be possible to modify the request headers in-flight using the webRequest API
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.
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.
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.
They are used in the Message History diff pages to signify old/new content , and styled as red/green highlights around the text. We should override this with the default style (strikethrough/underline).
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.
This will be easier to maintain and extend, and gives us more control over scope
Completed:
To-do:
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.
Seems likely that the old version will eventually become unsupported, and the current layout is somewhat difficult to navigate.
(inspired by sites like www.msworddit.com and www.msoutlookit.com)
could disguise topic list as something like Outlook or Gmail inbox, and load the message list in the email body (edited so that it seems like an authentic email)
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
it's ugly & difficult to modify
this doesn't transload to ETI correctly because of the weird URL structure. seems like removing everything after the image filename from the path would fix the issue
http://vignette3.wikia.nocookie.net/clarence/images/9/9c/Bill_lipped_girl_from_Forgotten.jpg
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.
seems like setting the tabIndex to -1 will prevent users from having to tab through them to get to the textarea.
Doesn't seem to impact functionality or performance, but it's annoying
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
it seems to work okay, but it needs to be tested more thoroughly (especially with regards to error handling)
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.