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

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

  1. // ==UserScript==
  2. // @namespace https://openuserjs.org/users/cuzi
  3. // @name Quora.com (mobile) hide 'View in app' overlay
  4. // @description Remove the "View in app" overlay on quora.com in mobile browsers
  5. // @copyright 2019, cuzi (https://openuserjs.org/users/cuzi)
  6. // @license MIT
  7. // @version 3
  8. // @include https://quora.com/*
  9. // @include https://*.quora.com/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. // ==OpenUserJS==
  14. // @author cuzi
  15. // ==/OpenUserJS==
  16.  
  17. function remove(query) {
  18. const e = document.querySelector(query)
  19. if (e) e.remove()
  20. }
  21.  
  22. const removeOverlayIV = window.setInterval(function () {
  23. remove('.OpenInAppBanner')
  24. let e
  25. if (document.querySelector('.ZapdosWallWrapper.show .ViewInAppLink')) {
  26. remove('.ZapdosWallWrapper.show')
  27. clearInterval(removeOverlayIV)
  28. }
  29. e = document.querySelector('.q-absolute.qu-bg--blue')
  30. if (e && e.textContent.indexOf('App') !== -1) {
  31. e.remove()
  32. clearInterval(removeOverlayIV)
  33. }
  34.  
  35. }, 2000)
  36.  
  37. const removeSignupOverlayIV = window.setInterval(function () {
  38. remove('.OpenInAppBanner')
  39. let e = document.querySelector('.new_signup_dialog')
  40. if (e) {
  41. e.parentNode.remove()
  42. }
  43. e = document.getElementById('page_wrapper')
  44. if (e) {
  45. e.style.filter = "blur(0px)"
  46. }
  47. e = document.body
  48. if (e) {
  49. e.classList.remove('signup_wall_prevent_scroll')
  50. }
  51.  
  52. e = document.querySelector('.modal_signup_dialog')
  53. if (e) {
  54. while(e.parentNode!= document.body) {
  55. e = e.parentNode
  56. }
  57. e.remove()
  58. }
  59.  
  60.  
  61. }, 1000)