hohMiyazawa / Automail

An enhancement collection for anilist.co
GNU General Public License v3.0
158 stars 31 forks source link

only half working in Vivaldi webrowser (with tampermonky) #35

Closed Martin1995 closed 4 years ago

Martin1995 commented 4 years ago

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

hohMiyazawa commented 4 years ago

Relevant: Anilist recently added changes that resulted in Automail having to change how custom CSS is implemented: https://github.com/hohMiyazawa/Automail/issues/33

hohMiyazawa commented 4 years ago

Could you post the specific CSS that caused the crash?

Martin1995 commented 4 years ago

im using some import from my own server for webfonts `@import url("https://kmwg.moe/kitsune-media-work-group.css");

/imports/

@import url("https://kmwg.moe/fonts/DS-Digital-webfont/dsdigital.css"); @import url("https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkaimincho.css"); @import url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.css"); @import url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.css");

/webfonts/

@font-face {font-family: "DS-Digital"; src: url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.eot"); / IE9/ src: url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.eot?#iefix") format("embedded-opentype"), / IE6-IE8 / url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.woff2") format("woff2"), / chrome、firefox / url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.woff") format("woff"), / chrome、firefox / url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.ttf") format("truetype"), / chrome、firefox、opera、Safari, Android, iOS 4.2+/ url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.svg#DS-Digital") format("svg"); / iOS 4.1- / } @font-face { font-family: "Genkaimincho Regular"; src: url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.eot); src: url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.eot?#iefix) format('embedded-opentype'), url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.woff2) format('woff2'), url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.woff) format('woff'), url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.ttf) format('truetype'), url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.svg#genkai-mincho) format('svg'); } @font-face{ font-family:"Sandoval W05 Speed"; src:url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.eot?#iefix"); src:url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.eot?#iefix") format("eot"), url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.woff2") format("woff2"), url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.woff") format("woff"), url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.ttf") format("truetype"); } @font-face{ font-family:"Toxigenesis Bold"; src:url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.eot?#iefix"); src:url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.eot?#iefix") format("eot"), url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.woff2") format("woff2"), url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.woff") format("woff"), url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.ttf") format("truetype"); }

/background section/

kitsune-background1{ /light dark grey/

background-color: rgba(47, 47, 47, 255); min-width: 1895px; } .red , .page-content { background: linear-gradient(45deg, rgba(255, 0, 0, 0.5), rgba(255, 0, 248, 0.5), rgba(0, 43, 255, 0.5)) !important; }

/font section/

msquaredfont {

font-family: "Sandoval W05 Speed"; }

kitsune-font1 , .markdown > h1{ /kitsune red + Toxigenesis/

color: rgb(255, 55, 55); font-family: "Toxigenesis Bold"; }

kitsune-font1.jp {

font-family: "Genkaimincho Regular" !important; }

kitsune-font2{/kitsune orange lite/

color: rgb(255, 123, 39); }

kitsune-font3{/kitsune orange strong/

color: rgb(255, 100, 0); }

kitsune-font4{ /kitsune red/

color: rgb(255, 55, 55); } .larger { font-size: larger; } .xlarge { font-size: x-large; } .xxlarge { font-size: xx-large } .xxxlarge { font-size: -webkit-xxx-large }

jp {

font-family: "Sazanami Mincho"; }

white {

color: rgb(255,255,255); } .nav > a , .links > a { font-family: "Sandoval W05 Speed"; } .nav > a:hover , .links > a:hover{ color: rgba(255,255,255,0.5) !important; } .links{ color: rgba(0, 125, 255, 1) !important; }

/UI Styling/

.content-wrap { width: 475px !important; }

.favourites-wrap { width: 475px !important; } .favourites-wrap > a { width: 100px !important; }`

hohMiyazawa commented 4 years ago

Before I start looking through that for potential issues, do you still get an error for something very simple? Like:

.favourites-wrap > a {
width: 100px !important;
}
Martin1995 commented 4 years ago

maybe i have too much in this field, because after putting .favourites-wrap > a { width: 100px !important; } in to the field pressing submit and just doing a reload with "F5" all console errors are gone. maybe it doesn't like some of my css?

hohMiyazawa commented 4 years ago

A possible solution is to just hasten the deployment of compressed profile JSON. Then lz-string will do this encoding, which hopefully is better.

Check if it still fails in v9.73

Martin1995 commented 4 years ago

maybe i found the problem myself now, i stripped the css down and after reinserting `/webfonts/

@font-face {font-family: "DS-Digital"; src: url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.eot"); / IE9/ src: url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.eot?#iefix") format("embedded-opentype"), / IE6-IE8 / url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.woff2") format("woff2"), / chrome、firefox / url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.woff") format("woff"), / chrome、firefox / url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.ttf") format("truetype"), / chrome、firefox、opera、Safari, Android, iOS 4.2+/ url("https://kmwg.moe/fonts/DS-Digital-webfont/63f874d192fb3892d88d5e26f942b5e2.svg#DS-Digital") format("svg"); / iOS 4.1- / } @font-face { font-family: "Genkaimincho Regular"; src: url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.eot); src: url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.eot?#iefix) format('embedded-opentype'), url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.woff2) format('woff2'), url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.woff) format('woff'), url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.ttf) format('truetype'), url(https://kmwg.moe/fonts/Genkai-Mincho-webfont/genkai-mincho.svg#genkai-mincho) format('svg'); } @font-face{ font-family:"Sandoval W05 Speed"; src:url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.eot?#iefix"); src:url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.eot?#iefix") format("eot"), url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.woff2") format("woff2"), url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.woff") format("woff"), url("https://kmwg.moe/fonts/Sandoval-W05-Speed-webfont/Sandoval-W05-Speed.ttf") format("truetype"); } @font-face{ font-family:"Toxigenesis Bold"; src:url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.eot?#iefix"); src:url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.eot?#iefix") format("eot"), url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.woff2") format("woff2"), url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.woff") format("woff"), url("https://kmwg.moe/fonts/Toxigenesis-webfont/Toxigenesis Bold.ttf") format("truetype"); }` it stopps working, maybe it's too much for now, it had worked before

after updating to 9.73 it works with that bit added, will try to put in all the css now

Martin1995 commented 4 years ago

also works with full CSS

hohMiyazawa commented 4 years ago

I believe I also found what caused the unrelated stack trace.

If the full CSS is working, the new approach seems to be sound.