Comments (20)
Did it work before 1.8.0?
from faceslim.
never did in fact :)
Stéphane Bérubé
Date: Sat, 5 Sep 2015 09:34:58 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [FaceSlim] black theme not working (#31)
Did it work before 1.8.0?
—
Reply to this email directly or view it on GitHub.
from faceslim.
It's something probably wrong in here - https://github.com/indywidualny/FaceSlim/blob/master/app/src/main/java/org/indywidualni/fblite/MyAppWebViewClient.java#L74
If someone could help me a little it would be great. I have no idea, everything is working for me.
from faceslim.
@indywidualny I've no idea how Android coding works. However I assume you scrape the CSS from m.facebook.com then change it. Could their CSS have changed?
from faceslim.
It's possible they have changed something but not the whole of their style sheet. I'm using javascript to inject my own css after every page is loaded. It's read from a file and IMHO the problem is just reading file to string, in this particular case. However it's strange because black css is working on all my devices and nobody complained until now.
from faceslim.
hi, it also doesn't work on my tablet (android 4.2.2). could it be related to lanfuage? i'm using the french translation.
Envoyé depuis un mobile Samsung
-------- Message d'origine --------
De : Krzysztof Grabowski [email protected]
Date : 09/08/2015 5:26 (GMT-05:00)
À : indywidualny/FaceSlim [email protected]
Cc : "Stephane B." [email protected]
Objet : Re: [FaceSlim] black theme not working (#31)
It's possible they have changed something but not the whole of their style sheet. I'm using javascript to inject my own css after every page is loaded. It's read from a file and IMHO the problem is just reading file to string, in this particular case. However it's strange because black css is working on all my devices and nobody complained until now.
—
Reply to this email directly or view it on GitHub.
from faceslim.
Language is not a problem for sure.
wt., 8 wrz 2015, 12:17 Stephane B. użytkownik [email protected]
napisał:
hi, it also doesn't work on my tablet (android 4.2.2). could it be related
to lanfuage? i'm using the french translation.Envoyé depuis un mobile Samsung
-------- Message d'origine --------
De : Krzysztof Grabowski [email protected]
Date : 09/08/2015 5:26 (GMT-05:00)
À : indywidualny/FaceSlim [email protected]
Cc : "Stephane B." [email protected]
Objet : Re: [FaceSlim] black theme not working (#31)It's possible they have changed something but not the whole of their style
sheet. I'm using javascript to inject my own css after every page is
loaded. It's read from a file and IMHO the problem is just reading file to
string, in this particular case. However it's strange because black css is
working on all my devices and nobody complained until now.—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub
#31 (comment)
.
from faceslim.
Karbonn Titanium Octane with Android 4.4.x , FaceSlim 1.8.0 from F-droid here. It just worked for me,
from faceslim.
Android 4.2.2 here, doesn't work either. I know how to code, so I can help you with testing/debugging if needed.
I haven't looked at the source code yet, so I don't know, but would a logCat help you in any way to determine what's wrong?
I'm using the latest version from F-Droid (2.0.0), but previous versions also didn't use the dark theme for display, even though it was enabled in the settings.
from faceslim.
Have a look please. It's extremely simple. After the page is loaded Java Script function is invoked to inject CSS read from a file:
Reading from file (method call):
The main method (really simple) reading the file:
I have no idea where something is wrong. I will add some log lines to it soon to make it easier to debug.
from faceslim.
I don't see anything wrong with your code either.
If you have a version with debug logging, I'd be happy to try it and post the logcat output.
I've started the application two times, once with the dark theme enabled and once with the dark theme disabled.
In the logcat of the first run (dark theme enabled), I see this:
I/BufferQueue( 130): [org.indywidualni.fblite/org.indywidualni.fblite.MainActivity](this:0x41e63050,api:1) [release] fps:23.83, dur:1007.23, max:230.73, min:15.32 I/SurfaceTextureClient(13430): [STC::queueBuffer] (this:0x60ed18e8) fps:39.65, dur:1008.94, max:426.31, min:3.13 I/BufferQueue(13430): [unnamed-13430-0](this:0x60ed4008,api:2) [queue] fps:39.64, dur:1008.96, max:426.51, min:3.08 I/BufferQueue( 130): [org.indywidualni.fblite/org.indywidualni.fblite.MainActivity](this:0x41de31e0,api:1) disconnect: api=1 I/SurfaceTexture( 130): [org.indywidualni.fblite/org.indywidualni.fblite.MainActivity] [virtual android::status_t android::SurfaceTexture::forceAuxConversionLocked()] mCurrentTexture:0, mCurrentBuf:0x41e0e290 I/BufferQueue( 130): [org.indywidualni.fblite/org.indywidualni.fblite.MainActivity](this:0x41de31e0,api:0) getReleasedBuffers: returning mask 0xffffffff I/SurfaceTexture( 130): [org.indywidualni.fblite/org.indywidualni.fblite.MainActivity](this:0x41ec3bf0,api:0) destroying EGLImage dpy=0x1 img=0x41c94f90 I/WindowManager( 559): Gaining focus: Window{41ecb338 u0 org.indywidualni.fblite/org.indywidualni.fblite.MainActivity} I/WindowManager( 559): Losing focus: Window{41dad150 u0 org.indywidualni.fblite/org.indywidualni.fblite.MainActivity} E/Web Console(13430): Uncaught SyntaxError: Unexpected token ILLEGAL at null:1 I/BufferQueue( 130): [org.indywidualni.fblite/org.indywidualni.fblite.MainActivity](this:0x41de31e0,api:0) consumerDisconnect I/BufferQueue( 130): [org.indywidualni.fblite/org.indywidualni.fblite.MainActivity](this:0x41de31e0,api:0) ~BufferQueue
That error is not there in the logcat when running with the dark theme disabled.
I hope this helps you to narrow down the problem.
from faceslim.
Apparently everything is ok with the code. The error is caused by illegal characters in the CSS file. Great news, it's so easy to fix!
from faceslim.
That's good news :)
What illegal characters are you talking about? The CSS file is ASCII text. Do you mean there are syntax errors in your CSS?
It's interesting how Android <=4.2.2 doesn't work and more recent versions do work. Maybe the WebView widget was changed to be more forgiving in later versions of Android?
from faceslim.
I copied some parts of the CSS file from a few sources, maybe something is illegal, some non printable characters... It shouldn't be but... No idea for now. The file is the problem for sure. The file is used to create this JS function. I remember a similar error when there was a syntax error in another JS function.
One thing is strange for sure. Why is it working for newer Android versions? :D
from faceslim.
The latest version at this moment (https://github.com/indywidualny/FaceSlim/blob/f479edc507041bc0bcca8d356d750420c5e0a239/app/src/main/res/raw/black.css) has no strange characters.
The only non-printable character is 0x0A, which is a newline and that is not illegal :)
I'll see if I can persuade Web Core
to generate more detailed logging. Maybe that can tell us what exact part of the CSS file it doesn't like.
from faceslim.
New lines seem to be a problem here - http://stackoverflow.com/a/12702807/4388718
This line has to be removed:
I will do so and send you a fixed package to test it.
from faceslim.
Either remove that line or change https://github.com/indywidualny/FaceSlim/blob/master/app/src/main/java/org/indywidualni/fblite/MyAppWebViewClient.java#L83 so it wraps str
in double quotes instead of single quotes.
That should also work according to the comments on your SO link.
Anyway, I'd be glad to test a fixed package and report success/failure.
from faceslim.
Try this please:
https://github.com/indywidualny/FaceSlim/blob/dc6c0fc2d92f171746ad1bcb526753982efac194/app/app-release.apk
I hope everything is ok now.
from faceslim.
It works! :D
from faceslim.
Awesome! Thanks for help. I wouldn't do anything without your logs.
It's gonna be released soon. New release is almost ready.
from faceslim.
Related Issues (20)
- Change navbar buttons color with transparent navbar
- Open intents in Faceslim
- Newsfeed doesn't work HOT 1
- How do I add translation? HOT 1
- [Messenger] Cannot reply to a message
- Add project logo "fs" to this GitHub page
- Multiple tabs
- Use a newer user agent by default HOT 2
- Facebook changed something so messenger doesn't work anymore. HOT 14
- Source code appears on refresh
- Links open in the desktop website HOT 1
- FaceSlim doesn't open any more
- Time for update
- Is faceslim still being worked on? or is it dead? Various new issues over the years. HOT 4
- Illegal user agent string will cause the app to never be able to start again
- Passing malformed intent to Gmail will not result in a proper bug report
- Attaching HEIC images fails
- Proxy
- Add the ability to copy text
- Cannot read messages anymore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faceslim.