BC: fixed/sticky player

keeps player visible when scrolling. choose a style in the code

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        BC: fixed/sticky player
// @namespace   userscript1
// @match       https://*.bandcamp.com/album/*
// @match       https://*.bandcamp.com/music/*
// @match       https://*.bandcamp.com/track/*
// @grant       GM_addStyle
// @run-at      document-start
// @version     0.1.4
// @author      -
// @description keeps player visible when scrolling. choose a style in the code
// @license     GPLv3
// ==/UserScript==

(function() {
  'use strict';


  // sticky, follows when scrolling
  const style1 = `.inline_player {
                    position: sticky !important;
                    top: 50px;
                    background: white;
                    box-shadow: 3px 3px 10px rgb(0 0 0 / 0.5);
                    z-index: 999;
                  } `;

  // fixed at bottom
  const style2 = `.inline_player {
                    position: fixed !important;
                    bottom: 5px;
                    background: white;
                    box-shadow: 3px 3px 10px rgb(0 0 0 / 0.5);
                    z-index: 999;
                 } `;

  // fixed at top
  const style3 = `.inline_player {
                    position: fixed !important;
                    top: 25px;
                    background: white;
                    box-shadow: 3px 3px 10px rgb(0 0 0 / 0.5);
                    z-index: 999;
                 } `;


  GM_addStyle( style3 );


})();