Skip to content

Commit b7290d1

Browse files
committed
Remove another iframe "GET 3 MONTHS FREE"
1 parent d3b71e5 commit b7290d1

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

SpotifyGeniusLyrics.user.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// @copyright 2020, cuzi (https://github.com/cvzi)
1414
// @supportURL https://github.com/cvzi/Spotify-Genius-Lyrics-userscript/issues
1515
// @icon https://avatars.githubusercontent.com/u/251374?s=200&v=4
16-
// @version 23.6.12
16+
// @version 23.6.13
1717
// @require https://greasyfork.org/scripts/406698-geniuslyrics/code/GeniusLyrics.js
1818
// @require https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.5.0/lz-string.min.js
1919
// @grant GM.xmlHttpRequest
@@ -787,6 +787,17 @@ if (document.location.hostname === 'genius.com') {
787787
} catch (e) {
788788
console.warn(e)
789789
}
790+
// Remove another iframe "GET 3 MONTHS FREE"
791+
try {
792+
const iframe = document.querySelector('.ReactModalPortal iframe[srcdoc*="/purchase/"]')
793+
if (iframe && iframe.contentDocument && iframe.contentDocument.body) {
794+
iframe.contentDocument.body.querySelectorAll('[data-click-to-action-url*="https://www.spotify.com/purchase/"]').forEach(function (button) {
795+
button.click()
796+
})
797+
}
798+
} catch (e) {
799+
console.warn(e)
800+
}
790801

791802
GM.getValue('hide_spotify_suggestions', true).then(function (hideSuggestions) {
792803
if (hideSuggestions) {

0 commit comments

Comments
 (0)