Code Monkey home page Code Monkey logo

automail's Introduction

Automail

Extra parts for anilist.co

When installed, a list of options in https://anilist.co/settings/apps can be used to configure the behaviour of the website

Automail primarily deals with:

  • Notifications
  • Statistics
  • Styling
  • Navigation
  • UI translation (Japanese, Spanish, Portuguese, German, Turkish, Norwegian, Southern Sami, Italian, French)

Available releases

As a userscript: https://greasyfork.org/en/scripts/370473-automail (How to use userscripts)
As a Firefox addon: https://github.com/hohMiyazawa/Automail/releases

Build from source

"src/" contains a makefile, run "make" there. Requires make, m4 and basic shell utilities

Will build the userscript and a Firefox addon in src/build/

If you have an archived version of this repo, updated code can be found at https://github.com/hohMiyazawa/Automail

Copyright

Copyright (C) 2019-2023 hoh and the Automail contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

automail's People

Contributors

alsogamer avatar as280093 avatar henrik9999 avatar hohmiyazawa avatar iamjustkoi avatar kazzarin avatar koopzington avatar kyoyacchi avatar mannerpots avatar mrjako2001 avatar nategasm avatar nfitzen avatar nzoba avatar reinachan avatar sam-oak avatar soulblade172 avatar wolfiiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

automail's Issues

Tags of own profile don't show up when logged in

So this problem seems to have started a few days ago.

I can view other users' tags on their profiles;
image
but my tags don't show up on my own profile;
image

Just to make sure it wasn't an issue with my profile in particular or an issue with cookies or cache, I looked at my profile in incognito mode, and sure enough, my tags show up;
image
so I made a temporary test account in incognito too, added a series to my list, and added a tag;
image
it doesn't show up while I'm logged into the account;
image
but it does show up if I view the account from a normal window (or if I log out of the account, presumably);
image

Site-wide Custom CSS Support

It seems that if I switch to, for example, Home tab before Custom CSS is loaded on the profile, the CSS will be loaded into Home tab instead. I replicated this several times, and it seems that if I switch to Home tab at the right moment (after the CSS started initialization but before it is injected), I can get it to work.

So a question arises, naturally. Is it possible to implement site-wide Custom CSS support? While I understand that this might not be a desired feature, it might prove to be very useful considering how many people complain about the look of certain parts of AniList.

Screenshot

Activity square timezone headache

The script makes activity squares clickable, sending you to the terms feed to show you the relevant activities.

With the new timezone upgrade, this is very likely broken.
Anilist itself may also be broken though (like before), so I have to figure out how to make the script broken in the same way as Anilist.

Like previews

Screenshot_2020-09-06_18-58-59
Can we have an option to close these? If there's already and i missed it, so sorry.

Suggestions for some new features.

I don't know if I'm allowed to request new features in the "issues" panel, so please let me know about that.

1. Improvements in anime list filter.

  • Add the year range option as seen in "Browse". Currently you can only select a specific year.

  • Allow filtering by tags as well as genres, the advanced tag filtering from browse would be even better

  • Allow selecting Hentai in the genre filter.

  • Allow selecting multiple formats instead of just one at a time.

  • Sorting by episode count.

2. Improvements in stats

  • Display the weighted score. Genres & Tags are sorted by weighted score but you can't see what that score exactly is.

  • Extend sorting by weighted score to VA, Studio and Staff stats.

  • Allow VA and Staff list entries to be expanded like the other stat categories.

3. Sorting options in studio pages

Currently the studio pages are sorted by newest first with no options to sort otherwise.

4. Option to hide currently watching hentai from the "Anime in progress" section on the homepage.


As an aside, is the release here any different from the one on greasyfork?
Since that was updated on Dec 11th, while the github release was uploaded on Dec 20th

Build on windows

Currently, the build chain depends on shell utilities.
Someone who knows windows should make a way to build it there too.

A question about installing Automail

I am new to this so this may be a very basic question. As following the readme file, when I run cmake, it shows me the usage of the command and when I run cmake makefile, I get the error:
C:\Users\Name\OneDrive\Desktop\Automail-master\src>cmake makefile
CMake Error: The source directory "C:/Users/Name/OneDrive/Desktop/Automail-master/src/makefile" is a file, not a directory.
I wanted to know what was causing this and how to fix it.
Thanks for the help!

Status Icons Vanished on Redesigned Studios Page

Hi,

On the newly redesigned Studios page on AL (example), when using Automail the list status icons (green dot for completed, red dot for dropped, blue dot for watching) are currently hidden.

The way I've found to get them to show up again is to comment out the following two rules located at line 2913 in the script:

/* .search-page-unscoped.cardView .list-status, .studio-page-unscoped.cardView .list-status{ transform: translate(-18px,-18px); } */
/* .search-page-unscoped:not(.listView) .list-status, .studio-page-unscoped:not(.listView) .list-status{ transform: translate(-20px,-20px); } */

Something that can be relatively easily fixed on the user end but wanted to bring it up for a global fix when possible.

Thanks!

"Sorry, Automail does not work for donators"

Related to #2

Automail is currently disabled for donators. As a workaround, you can use an archives version of the script at greasyfork, or manually edit the file /src/settings.js or a build version of the script (search for the title message)

Interactions with the commercial aspects of Anilist are currently tense.

Share what course of action you consider the best.

Copy anime's start and finish date to your list

I joined AL many years after I started watching anime. There are a lot of anime that I watched while it was airing but those don't have dates on them. Would it be possible for you to implement a function that lists all anime without dates. Then it let's you choose the anime one by one or all of them and copies the start and finish date on the anime's media page to your list.

Bio bug in Opera Gx

Since today the pictures in my (and everyone elses) bio are extremly large. I tested it and if i deactivate automail everything is normal again. After that i tested it with the google chrome browser and there everything is normal even with the script. So i don't know if its a bug from my opera gx browser or the automail script.

With automail
Without automail

And i use img24% for the picture size but nothing changes if i use img220.

Testing on Safari

Safari should in theory be supported, but it's hard to know since I don't have access to it, and it's quite quirky.

Would appreciate if someone could test this from time to time, and report if something's broken

What is Boneless

Boneless is a cut down version of Automail, edited sufficiently to be discussable on Anilist.
Boneless will:

  • Remove anything that moderators demand removed
  • Add anything that moderators demand added

Do not mention Automail on Anilist as it's a banned topic.

I do not recommend installing both Boneless and Automail at the same time.

If you want the package of modules presented in this repo, use Automail.
If you want the package of modules approved by Anilist, use Boneless.

Automail has no build system

Automail is migrated here from an internal git repository.
Uploading it here would just be confusing, since it's ill suited for a shared repo, and is specifically oriented towards a userscript build.

This means this repo currently only has the "automailLEGACY.js" file

Ideally, this should be broken up in parts to make it easy to work on Automail.

Help needed for the most practical structure for that

Review stats are soon becoming too API demanding

Currently, the review stats just pull all the reviews when you request that query.

That worked fine when there were only about a thousand reviews or so, but now that's starting to push the limits of how many API requests can be sent.

Is better twitter embedding possible?

if(document.getElementById("automailTwitterEmbed")){
	document.getElementById("automailTwitterEmbed").remove()
}

Essentially, the script currently re-insert the twitter embedding script every time it encounters a new tweet. This is necessary since it's impossible to guarantee all page content has been loaded by the time the script runs. ("load more", autoloading on scroll, etc.).

But this also causes costly re-rendering of all tweets (quadratic complexity).

Does a better way exist?

REQUEST: Allow comments in user CSS

Using this css https://github.com/Kreyren/anilist_css/blob/master/core.css with automail does not work, because automail does not work with comments.

Expected behavior

Expecting automail to work with comments.

Minimal example:

With comment:

/* Font color */
.time[data-v-6994d971],
.stat .label[data-v-815ccddc],
.nav .link[data-v-66e5278e],
.el-dropdown-menu,
el-dropdown-menu__item, body, h1, h2, h3, p {
	color: rgb(255, 219, 0);
}

Without comment:

.time[data-v-6994d971],
.stat .label[data-v-815ccddc],
.nav .link[data-v-66e5278e],
.el-dropdown-menu,
el-dropdown-menu__item, body, h1, h2, h3, p {
	color: rgb(255, 219, 0);
}

Custom CSS size limitation?

It's really not a good idea to push any boundaries by making ridiculously long bios (bios are where the custom CSS is stored).

Should there be a maximum length imposed?

Note that you can just paste a link to an external stylesheet in the custom CSS field, to have no size limitation.

Custom Background

I'm having difficulty getting the custom background to work. Under the Apps tab at the bottom, you gave out some examples of different backgrounds that can be used. I tried testing it with the color red and I see the actual CSS line in my profile bio but after going back to my profile page, nothing changes.

For example, if I type in "red" in the box located at the App tab, I will get this CSS line in my profile bio:

<!--{"background":"red"}-->

Going back to my profile page, nothing is changed. I've tried this using hex color codes and images and still, nothing works.

AniList borked HTML comments

HTML comments now get parsed out of anything which includes bios too, so it pretty much breaks the custom CSS module.
Me and @DatLycan are trying to get a RegEx to work using markdown's comments that look like this:

[comment]: # "(<comment text goes here>)"

Extended module descriptions

In the upcoming versions of Automail, many modules will have extended descriptions available in addition to the current one-liner:

Settings page screenshot

You can help in the following ways:

  • Request clarifications for what a module does. This is not immediately obvious to me, since I wrote the code.
  • Report spelling errors or awkward formulations in published descriptions.
  • Write descriptions yourself (TODO: provide instructions about how)

All of these things can be posted in this issue. You may optionally make pull requests if that's more of your thing.

Fix for Youtube fullscreen option

I was checking the problem about the option "Enable fullscreen button on Youtube videos" not working.
After a bit of fiddling around with the iframe, I found out that the attribute __idm_frm__ was causing the attribute allowfullscreen to not work.

So, removing that tag works but weirdly, the Youtube link needs to refresh so that the fullscreen button works. One simple way is changing the URL parameter autohide from 1 to 0. I'm not even sure if this parameter is being used for anything, changing that value doesn't alter the video behavior.

Adding these two lines where you set the allowfullscreen tag does the job:

video.removeAttribute("__idm_frm__");
video.setAttribute("src",video.getAttribute("src").replace("autohide=1","autohide=0"));

Improve status dots' filters

While making use of the dots to filter by status I thought it would be nice if by clicking the selected filter again it'd reset.

statusSumDot.onclick = function(){
filterSelect.value = "status:" + status.toLowerCase();
filterSelect.dispatchEvent(new Event("input",{bubbles: true}))
}

Something like this could work maybe?

if (filterSelect.value == "status:" + status.toLowerCase()) {
    filterSelect.value = "";
} else {
    filterSelect.value = "status:" + status.toLowerCase();
}
// ...plus event thingy

Suggestions

Hey :) i just found out today about this script and i really like it but there is one thing i really want and the others i don't know if its possible ^^

  1. I really like the vertical navbar but i don't like that its on the left side :/ it would be great if we get an option to put it on the right side. I could activate the right to left flow option but that changes everything so its not what i want :/

  2. If its possible it would be nice if we can set the default list order to completed or started date.

  3. I don't know how hard this would be to make but it would be awesome if there would be an stats option that shows you how many episodes you watched in a year. Anilist only shows how many episodes you watched in the year where you started this title so this is not really good. The only way this can work if the script is looking though your whole activity and detects every title and the highest episode count.

  4. An on/off option for the browse/list where the script combines every title in an "folder" based on the anime series. And if you click on on of these "folders" you get a little dropdown menu where every title (Sequel, OVAs, Specials etc.) is in one place.

Ongoing adblocking dispute

Automail can currently not be advertisted on anilist due to how it interfers with anilist ads.

The correspondence with Josh and site moderators is not available since I didn't archive it (irc, deleted anilist activities)

Ask questions here, and state what you want Automail do to with the situation

Chrome build

Building this as a Chrome addon should probably not be difficult. Help wanted.

Anime status in Recommendations not loading on second page

Howdy hoh!

While i was planning my December monthly i've checked Cowboy Bebop's recommendations and noticed after clicking on "View all 50 recommendations" and scrolling down to trigger loading the second page of recommendations that the status indicators are not shown on the new entries.

https://i.imgur.com/mBq9qX3.png
https://i.imgur.com/tdYrD5y.png

You might have that on your radar already but i thought i'd let you know.

Keep up the good work!
Koopz

Site breaks after switching anime/manga pages

Description
Sometimes when clicking on related anime/manga the site just breaks completely, it won't load any new pages, it just keeps displaying the same page despite the URL changing fine. Reload fixes it. Sometimes the navigation bar even gets gray.
It even happens in a private window with no other extensions, private window also caused Automail to use default settings.

Browser: Brave (Version 1.18.78 Chromium: 87.0.4280.141 (Official Build) (64-bit))
Script manager: Tampermonkey (v4.11)

Reproduce
It seems kinda random to me but it still happens consistently, just not always the same way.

  • Go to a users anime/manga page
  • Click on a anime/manga (like Attack on Titan)
  • Click on source/adaption repeatedly to switch back and forth (or just generally switching between related anime)
  • Usually it happens on the second time already

Console

remind hoh to update the commonUnfinishedManga list
userscript.html?name=Automail.user.js&id=<id>:17728 Automail 9.97.6
[Violation] 'setTimeout' handler took 82ms
main.b3506417.js:1 Cache enabled: v21
animelist:1 Failed to decode downloaded font: https://anilist.co/fonts/element-icons.2fad952a.woff
animelist:1 OTS parsing error: invalid version tag
<3 errors from adsbygoogle.js>
5[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>

chunk-vendors.93654cf8.js:17 DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
    at Object.mi [as insertBefore] (https://anilist.co/js/chunk-vendors.93654cf8.js:17:41989)
    at E (https://anilist.co/js/chunk-vendors.93654cf8.js:17:46452)
    at T (https://anilist.co/js/chunk-vendors.93654cf8.js:17:47172)
    at a.__patch__ (https://anilist.co/js/chunk-vendors.93654cf8.js:17:48314)
    at a.t._update (https://anilist.co/js/chunk-vendors.93654cf8.js:17:26954)
    at a.r (https://anilist.co/js/chunk-vendors.93654cf8.js:17:27777)
    at nr.get (https://anilist.co/js/chunk-vendors.93654cf8.js:17:30645)
    at nr.run (https://anilist.co/js/chunk-vendors.93654cf8.js:17:31378)
    at Zn (https://anilist.co/js/chunk-vendors.93654cf8.js:17:29585)
    at Array.<anonymous> (https://anilist.co/js/chunk-vendors.93654cf8.js:17:12740)

main.b3506417.js:1 Uncaught (in promise) TypeError: Cannot read property 'status' of undefined
    at main.b3506417.js:1
    at Generator.throw (<anonymous>)
    at r (chunk-vendors.93654cf8.js:9)
    at c (chunk-vendors.93654cf8.js:9)

[Suggestion] BBCode to Anilist Markdown Conversion

Suggesting the ability to type out in traditional BBCode (Ex. [b]bold[/b] instead of anilist's _bold_) for people who enjoy/prefer/are used to typing in BBCode. And as your typing it changes it to anilist's flavor in the preview and the submission. Obviously it'd only support what Anilist has avaliable for comparable options. But if someone wants to use [b]bold[/b] instead of _bold_ they can.

Maybe alongside this, an option to hide Anilist's "easy formatting" options (the buttons you can click while typing, such as B for bold, i for italics, the Youtube icon for youtube, etc.

only half working in Vivaldi webrowser (with tampermonky)

at the moment i can not update or change the css, upload suddendly stopped working,
i also getUncaught TypeError: Cannot read property '0' of null at Window.addForumMedia (userscript.html?name=Automail.user.js&id=a1a5a516-b6ce-4fab-9d15-899975c34618:14401) at <anonymous>:3:98 at G.c.<computed> (eval at exec_fn (apps:1), <anonymous>:42:472)
and the following after clicking on the submit button of the CSS field
VM60:3 Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range. at <anonymous>:3:98 at Window.d.<computed> [as btoa] (<anonymous>:9:367) at HTMLButtonElement.backgroundChange.onclick (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=Automail.user.js&id=a1a5a516-b6ce-4fab-9d15-899975c34618:26151:38)

I'm using Vivaldi 3.0.1874.38 (Stable channel) (64-Bit) on linux (Arch Linux if it matters)
and the tampermonky plugin with the userscript

Too many options?

There are currently ridiculously many options. Splitting them into tabs helped a little, but is the settings page hard to navigate at the moment?

Anime-Planet importer maintainer needed

The A-P importer worked when I wrote it.

Does it work now? Probably. I have no idea.

I would like to have someone that could infrequently check if it still works. You will need:

  • To be familiar with Anime-Planet (I'm not)
  • Have some exported list data from Anime-Planet
  • Have a dummy Anilist account for testing.

"Most liked status posts" query crashes browser.

As the title suggests the Most liked status posts query at the bottom of ones More stats page crashes the browser.
It seems like the for loop from line 22164 - 22166 of the script is running indefinitely:

for(var i=2;i<=data.data.Page.pageInfo.lastPage;i++){
	generalAPIcall(query,{userId: userId,page: i},addNewUserData);
};

It would be great if you could look into this issue.

Thank you in advance!
 

  • Browser: Brave (chromium-based)
  • Script manager: Tampermonkey
  • Version: 9.97.1

[Suggestion] Sync From AniDB | Hentai Icon on Lists

First I want to start by bumping my old request for a hentai icon on lists. Just a tiny small icon to quickly identify hentai. (Something like a small icon of pink lips or something).

And my main suggestion being implementation of being able to grab user list updates from Anidb.
I would assume this can even be done without needing a sign in to Anidb. Just type the username you want to monitor on anidb, then when they update their list on anidb, it updates your anilist list. Or just sign in to Anidb. But I think the monitoring is better (if possible) for the sole reason of not needing to sign in just to limit security risks.

So as an example:

AniDB User: SSSS-Gridman, Watched Episodes 1 to 3.
Updates your list on Anilist to show you watched episodes 1 to 3 of SSSS-Gridman.

This would obviously apply to ratings and whatever else it can grab from AniDB.

The benefit of this would be allowing users to use AniDB for their main database tracking. Using AniDB as a backup/secondary. Also keeping connections on Anilist, allowing users on Anilist to stay up to date with what you're watching, not having to manually update both lists. AniDB quite honestly offers way more in options of tracking (Whether you have a series saved on your hdd, remote storage, etc.) just as an example.

Donors

Will this ever be available for donors?

General discussion welcome

This is the platform where the script can be freely discussed.

On Anilist, I'm not allowed to mention it, which makes communication difficult.

Don't be afraid to open new issues or post here.

Looking for Slick Boy D, userstyle developer, to talk about a new project

Hello,

Slick Boy D is a userscript developer (https://33kk.github.io/uso-archive/?page=3&sort=updated&style=162817), and he mentioned in his project's description that there is compatibility between his userstyle and your userscript on the anilist.co website.

As I'm planning to create a new userstyles sharing platform to replace userstyles.org, I would like to contact him so I could get relevant feedback from userstyles developers in order to make a platform that suits their needs.

Thanks

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.