BC: fixed/sticky player

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

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 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 );


})();