0
我triyng在webView上顯示twitter站點。 我該如何刪除/解僱/隱藏標題(「打開的應用程序」消息)?如何從android上的WebView中刪除<header>?
<header class="CoreLayout-header" role="banner"><div class=" AppHeader"><div class="OpenInAppBar u-cf" jsnamespace="OpenInAppBar"><div class="u-containerWithGutter"><a href="twitter://user?screen_name=nba" jsaction="click:openApp" class="OpenInAppBar-link u-textSmall u-inlineBlock">Open application</a><button class="OpenInAppBar-dismiss u-floatRight" aria-label="התעלם" jsaction="click:snooze" type="button"><span class="OpenInAppBar-dismissIcon u-alignMiddle Icon Icon--close" role="presentation"><img src="data:image/gif;base64,R0lGODlhFwAkAIAAAP///////yH5BAEKAAEALAAAAAAXACQAAAIbjI+py+0Po5y02ouz3rz7D4biSJbmiabqyjIFADs="><svg viewBox="0 0 46 72"><use fill="currentcolor" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/i/rw/svg/c25636093d431d0e28be32cd59239cf6/icon#icon-close"></use></svg></span></button></div></div><div class=" AppBar u-cf" data-scribe-component="top_bar" jsnamespace="AppBar"><div class="u-containerWithGutter"><h1 class="u-floatLeft"><a class="AppBar-item" aria-label="Twitter" href="/" jsaction="homeNav"><span class="AppBar-icon Icon Icon--twitter" role="presentation"><img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="><svg viewBox="0 0 72 72"><use fill="currentcolor" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/i/rw/svg/c25636093d431d0e28be32cd59239cf6/icon#icon-twitter"></use></svg></span></a></h1><div class="u-floatRight"><a class="AppBar-search AppBar-item" aria-label="חיפוש בטוויטר" href="/search" role="search" jsaction="search"><span class="AppBar-icon Icon Icon--search" role="presentation"><img src="data:image/gif;base64,R0lGODlhBwAJAIAAAP///////yH5BAEKAAEALAAAAAAHAAkAAAIHjI+py+1cAAA7"><svg viewBox="0 0 56 72"><use fill="currentcolor" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/i/rw/svg/c25636093d431d0e28be32cd59239cf6/icon#icon-search"></use></svg></span></a></div></div></div><div class=" SignUpBar"><div class="u-containerWithGutter"><div class="SignUpBar-content u-md-size3of4"><div class="Grid Grid--withGutter"><div class="Grid-cell u-size1of2"><a class="SignUpBar-button u-sizeFull Button Button--textBlue " href="/signup"><span class="Button-content">sign</span></a></div><div class="Grid-cell u-size1of2"><a class="SignUpBar-button u-sizeFull Button Button--default " href="/session/new"><span class="Button-content">Enter</span></a></div></div></div></div></div></div><div class="AppHeader-tracking"><img src="https://cert.twitter.com/robots.txt"><img src="https://twitter.com/robots.txt"></div></header>
我正在使用jsuop庫,但沒有線索如何刪除標題。
很抱歉,但我不明白這一點。你能給我寫一個示例代碼嗎? – Anna
等一下。您只想在Android設備上顯示時將其刪除?或僅當它在WebView中時?另外,看到另一個答案,目前還不清楚是否要刪除整個標題(您在此處發佈的所有內容)或僅刪除「打開的應用程序」鏈接? –