Snetry / Twitter unhide sensitive content

// ==UserScript==
// @name         Twitter unhide sensitive content
// @version      1.2
// @description  always show all sensitive content
// @copyright    2019, Jan Drögehoff
// @author       Snetry
// @license      MIT
// @match        https://twitter.com/*
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function () {
  'use strict';
  setInterval(unhideall, 400);
})();

function unhideall() {
  var buttonamount = document.getElementsByClassName("btn-link").length;

  if (document.getElementsByClassName("ProfileWarningTimeline-button").length) {
    document.getElementsByClassName("ProfileWarningTimeline-button")[0].click();
  }

  for (var x = 0; buttonamount > x; x++) {
    if (document.getElementsByClassName("btn-link")[x].innerText == "View") {
      document.getElementsByClassName("btn-link")[x].click();
    }
  }
}