This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
forked from chandevel/Clover
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial steps to show the JS challenge
- Loading branch information
1 parent
e58ecdf
commit b45b1ac
Showing
5 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...ba/app/src/main/java/com/github/adamantcheese/chan/ui/controller/ChallengeController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.github.adamantcheese.chan.ui.controller; | ||
|
||
import android.content.Context; | ||
import android.webkit.WebView; | ||
|
||
import com.github.adamantcheese.chan.controller.Controller; | ||
import com.github.adamantcheese.chan.core.model.orm.Loadable; | ||
|
||
public class ChallengeController extends Controller { | ||
protected Loadable behindChallenge; | ||
|
||
public ChallengeController(Context context, Loadable behindChallenge) { | ||
super(context); | ||
this.behindChallenge = behindChallenge; | ||
} | ||
|
||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
|
||
WebView web = new WebView(context); | ||
|
||
web.loadUrl(behindChallenge.desktopUrl()); | ||
web.getSettings().setJavaScriptEnabled(true); | ||
this.view = web; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters