Quora.com (mobile) hide 'View in app' overlay

Remove the "View in app" overlay on quora.com in mobile browsers

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @namespace     https://openuserjs.org/users/cuzi
// @name          Quora.com (mobile) hide 'View in app' overlay
// @description   Remove the "View in app" overlay on quora.com in mobile browsers
// @copyright     2019, cuzi (https://openuserjs.org/users/cuzi)
// @license       MIT
// @version       3
// @include       https://quora.com/*
// @include       https://*.quora.com/*
// @grant none
// ==/UserScript==

// ==OpenUserJS==
// @author cuzi
// ==/OpenUserJS==

function remove(query) {
  const e = document.querySelector(query)
  if (e) e.remove()
}

const removeOverlayIV = window.setInterval(function () {
  remove('.OpenInAppBanner')
  let e
  if (document.querySelector('.ZapdosWallWrapper.show .ViewInAppLink')) {
    remove('.ZapdosWallWrapper.show')
    clearInterval(removeOverlayIV)
  }
  e = document.querySelector('.q-absolute.qu-bg--blue')
  if (e && e.textContent.indexOf('App') !== -1) {
    e.remove()
    clearInterval(removeOverlayIV)
  }

}, 2000)

const removeSignupOverlayIV = window.setInterval(function () {
  remove('.OpenInAppBanner')
  let e = document.querySelector('.new_signup_dialog')
  if (e) {
    e.parentNode.remove()
  }
  e = document.getElementById('page_wrapper')
  if (e) {
    e.style.filter = "blur(0px)"
  }
  e = document.body
  if (e) {
    e.classList.remove('signup_wall_prevent_scroll')
  }

 e = document.querySelector('.modal_signup_dialog')
 if (e) {
   while(e.parentNode!= document.body) {
     e = e.parentNode
   }
   e.remove()
 }


}, 1000)