package com.phsapp.phsapp;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebSettings;
import android.widget.*;
import android.webkit.*;

public class newsActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_club);
        final pl.droidsonroids.gif.GifTextView loading = (pl.droidsonroids.gif.GifTextView) findViewById(R.id.load);
        final WebView myWebView = (WebView) findViewById(R.id.webview1);
        final TextView ltext = (TextView) findViewById(R.id.textView);
        myWebView.setVisibility(View.INVISIBLE);
        WebSettings websettings = myWebView.getSettings();
        websettings.setJavaScriptEnabled(true);
        myWebView.getSettings().setJavaScriptEnabled(true);
        myWebView.loadUrl("https://penn.phmschools.org/news");
        myWebView.setWebViewClient(new WebViewClient() {
            @Override
            public void onPageFinished(WebView view, String url) {
                myWebView.loadUrl("javascript:(function() { " +
                        "var head = document.getElementsByID('main-header')[0];"
                        + "head.parentNode.removeChild(head);"+
                        "})()");
                myWebView.loadUrl("javascript:(function() { " +
                        "var head = document.getElementsByTagName('main-footer')[0];"
                        + "head.parentNode.removeChild(head);"+
                        "})()");
                loading.setVisibility(View.INVISIBLE);
                ltext.setVisibility(View.INVISIBLE);
                myWebView.setVisibility(View.VISIBLE);
            }
        });
    }




}

@@ -21,16 +21,79 @@
 hsapp;%0A%0A
+import android.content.Context;%0Aimport android.content.Intent;%0A
 import a
@@ -159,16 +159,46 @@
 Bundle;%0A
+import android.view.KeyEvent;%0A
 import a
@@ -332,16 +332,17 @@
 kit.*;%0A%0A
+%0A
 public c
@@ -387,16 +387,264 @@
 ivity %7B%0A
+    final pl.droidsonroids.gif.GifTextView loading = (pl.droidsonroids.gif.GifTextView) findViewById(R.id.load);%0A    final WebView myWebView = (WebView) findViewById(R.id.webview1);%0A    final TextView ltext = (TextView) findViewById(R.id.textView);
 %0A    @Ov
@@ -711,52 +711,8 @@
 ) %7B%0A
-        super.onCreate(savedInstanceState);%0A
     
@@ -767,258 +767,91 @@
     
-final pl.droidsonroids.gif.GifTextView loading = (pl.droidsonroids.gif.GifTextView) findViewById(R.id.load);%0A        final WebView myWebView = (WebView) findViewById(R.id.webview1);%0A        final TextView ltext = (TextView) findViewById(R.id.textView
+myWebView.setVisibility(View.VISIBLE);%0A        loading.setVisibility(View.INVISIBLE
 );%0A 
@@ -853,33 +853,29 @@
 E);%0A        
-myWebView
+ltext
 .setVisibili
@@ -1053,32 +1053,76 @@
 tEnabled(true);%0A
+        super.onCreate(savedInstanceState);%0A
         myWebVie
@@ -1277,48 +1277,1425 @@
 d on
-PageFinished(WebView view, String url) %7B
+ReceivedError(WebView view, WebResourceRequest request, WebResourceError error) %7B%0A                    Context context = getApplicationContext();%0A                    CharSequence text = %22Meme!%22;%0A                    int duration = Toast.LENGTH_SHORT;%0A                    final Toast toast = Toast.makeText(context, text, duration);%0A                    loading.setVisibility(View.INVISIBLE);%0A                    ltext.setVisibility(View.INVISIBLE);%0A                    myWebView.setVisibility(View.VISIBLE);%0A                    toast.show();%0A                    Intent intent = new Intent(view.getContext(), MainActivity.class);%0A                    startActivity(intent);%0A                    super.onReceivedError(view, request, error);%0A            %7D%0A            public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) %7B%0A                loading.setVisibility(View.INVISIBLE);%0A                ltext.setVisibility(View.INVISIBLE);%0A                myWebView.setVisibility(View.VISIBLE);%0A                Intent intent = new Intent(view.getContext(), MainActivity.class);%0A                startActivity(intent);%0A                super.onReceivedHttpError(view, request, errorResponse);%0A            %7D%0A            public void onPageFinished(WebView view, String url) %7B%0A                loading.setVisibility(View.INVISIBLE);%0A                ltext.setVisibility(View.INVISIBLE);
 %0A   
@@ -2817,17 +2817,17 @@
 tsBy
-ID('main-
+TagName('
 head
@@ -3068,13 +3068,8 @@
 me('
-main-
 foot
@@ -3195,68 +3195,287 @@
     
-loading.setVisibility(View.INVISIBLE);%0A                ltext
+myWebView.loadUrl(%22javascript:(function() %7B %22 +%0A                        %22var head = document.getElementsByClassName('l-region l-region--content-right')%5B0%5D;%22%0A                        + %22head.parentNode.removeChild(head);%22+%0A                        %22%7D)()%22);%0A                myWebView
 .set
@@ -3482,34 +3482,32 @@
 Visibility(View.
-IN
 VISIBLE);%0A      
@@ -3520,44 +3520,305 @@
     
-myWebView.setVisibility(View.VISIBLE
+super.onPageFinished(view, url);%0A            %7D%0A            public void onUnhandledKeyEvent(WebView view, KeyEvent event)%7B%0A                Intent intent = new Intent(view.getContext(), MainActivity.class);%0A                startActivity(intent);%0A                super.onUnhandledKeyEvent(view, event
 );%0A 
@@ -3852,10 +3852,12 @@
   %7D%0A
+%7D%0A%0A
 %0A%0A%0A%0A
-%7D
 %0A

Update newsActivity.java