4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

クロネコヤマトの404ページをJavascriptの標準機能だけでダンボールをこじ開けてみた

Last updated at Posted at 2021-04-14

元ネタ

jQueryを使わずJavascriptの標準機能だけでシンプルにこじ開けてみた。

Let's こじ開ける

こじ開ける.js
document.querySelectorAll('div.box-game-pc div.box-game-item a.box-game-item-link').forEach((a) => {
    a.classList.remove('disabled');
    a.click();
});

普段はあまり使わない、これ見よがしなラムダ式。

image.png

ぱんぱかぱーん

全部当たりアニメーション

アニメーションは box を操作したいので、queryを分ける。

全部当たり.js
document.querySelectorAll('div.box-game-pc div.box-game-item').forEach((box) => {
    box.querySelectorAll('a.box-game-item-link').forEach((a) => {
        a.classList.remove('disabled');
        a.click();
    });
    box.style.zIndex = 10000;
    box.classList.add('box-anime-03');
});

image.png

以上

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?