diff --git a/app/src/main/java/com/hippo/ehviewer/ui/WebViewLoginActivity.java b/app/src/main/java/com/hippo/ehviewer/ui/WebViewLoginActivity.java index f575a19a2..3d39a7298 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/WebViewLoginActivity.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/WebViewLoginActivity.java @@ -1,5 +1,22 @@ +/* + * Copyright (C) 2015 Hippo Seven + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.hippo.ehviewer.ui; +import android.annotation.SuppressLint; import android.os.Bundle; import android.webkit.CookieManager; import android.webkit.WebView; @@ -14,12 +31,13 @@ public class WebViewLoginActivity extends AbsActivity { public static final String KEY_ERROR = "error"; - + @SuppressLint("SetJavaScriptEnabled") protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); CookieManager.getInstance().removeAllCookie(); WebView wv = new WebView(this); + wv.getSettings().setJavaScriptEnabled(true); wv.setWebViewClient(new LoginWebViewClient()); wv.loadUrl(EhClient.LOGIN_URL); setContentView(wv);