Sniper pixelcanvas !

Mets un viseur de snipeur sur le pointeur et fais le bruit d'un sniper lorsque l'on clique.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name        Sniper pixelcanvas !
// @namespace   ?
// @description Mets un viseur de snipeur sur le pointeur et fais le bruit d'un sniper lorsque l'on clique.
// @include     https://pixelplanet.fun/*
// @version     1.1
// @grant       none
// ==/UserScript==


var canvas = document.getElementsByClassName("viewport")[0];
canvas.style.cursor = "crosshair";

var audio = document.createElement("audio");
audio.src = "http://www.universal-soundbank.com/sounds/12019.mp3";
audio.id = "tirAudio";
document.getElementsByClassName("viewport")[0].appendChild(audio);

canvas.addEventListener('click', event => {
  document.getElementById('tirAudio').play();
  canvas.style.cursor = "crosshair";
});