BC: record label link visible

copy the "← record label" link above the album art so it's visible without resizing the browser window

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        BC: record label link visible
// @namespace   userscript1
// @match       https://*.bandcamp.com/*
// @match       https://*.bandcamp.com/
// @grant       none
// @version     0.1.1
// @description copy the "← record label" link above the album art so it's visible without resizing the browser window
// @license     GPLv3
// ==/UserScript==

(function() {
  'use strict';

  document.querySelector('div.middleColumn')?.insertAdjacentHTML('afterBegin',
    `<div id="labelcopy" style="margin-bottom: 1em;"></div>`
  );

  var target = document.querySelector('#labelcopy');
  document.querySelectorAll('a.back-to-label-link').forEach(a => {
    var text = a.firstElementChild.innerHTML.split('<br>').join(' '); // innerText strips thelinebreak??
    var href = a.href;
    target.innerHTML = `<a href=${href}>← ${text}</a>`;
  });

})();