Fix Post Right Click

A simple userscript that remove's blocking elements to allow copying the image on Instagram and adds video controls

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Fix Post Right Click
// @namespace    https://github.com/naviamold1
// @version      0.2.1
// @homepage     https://greasyfork.org/en/scripts/476010-fix-image-copy
// @description  A simple userscript that remove's blocking elements to allow copying the image on Instagram and adds video controls
// @author       Naviamold
// @license      MIT
// @match        *://*.instagram.com/*
// @icon         https://static.cdninstagram.com/rsrc.php/y4/r/QaBlI0OZiks.ico
// @grant        none
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @require      https://greasyfork.org/scripts/476008-waitforkeyelements-gist-port/code/waitforkeyelements%20gist%20port+.js
// ==/UserScript==

(function () {
  "use strict";

  waitForKeyElements(
    "._aagw",
    () => {
      document.querySelector("._aagw").remove();
    },
    false
  );
  setInterval(() => {
    document
      .querySelectorAll("div[data-instancekey]")
      .forEach((val) => val.remove());
    document
      .querySelectorAll("video")
      .forEach((val) => val.setAttribute("controls", "true"));
  }, 500);
})();