Skip to content

Commit

Permalink
hotfix for amazon desktop pages viewed on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
holyspiritomb committed Feb 8, 2024
1 parent 1c6d581 commit 022c0d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions goodreads-libby-adguard.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Goodreads and Amazon Libby Results
// @namespace https://github.com/holyspiritomb
// @version 1.3.0
// @version 1.3.1
// @description Searches for the book you are looking at on Goodreads or Amazon across all your libby libraries. Forked from Dylancyclone's script.
// @author holyspiritomb
// @updateURL https://raw.githubusercontent.com/holyspiritomb/goodreads-libby-userscript/main/goodreads-libby-adguard.user.js
Expand Down Expand Up @@ -94,7 +94,7 @@
let libraries = JSON.parse(await GM.getValue("libraries", "[]"));
var previousBox;
if (unsafeWindow.location.host == "www.amazon.com") {
let findPreviousBox = () => document.getElementById("shopAllFormats_feature_div") || document.getElementById("bookDescription_feature_div");
let findPreviousBox = () => document.getElementById("shopAllFormats_feature_div") || document.getElementById("bookDescription_feature_div") || document.getElementById("followTheAuthor_feature_div");
previousBox = findPreviousBox();
} else if (unsafeWindow.location.host == "www.goodreads.com") {
previousBox = document.querySelector(".BookDetails");
Expand Down
4 changes: 2 additions & 2 deletions goodreads-libby.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Goodreads and Amazon Libby Results
// @namespace https://github.com/holyspiritomb
// @version 1.3.0
// @version 1.3.1
// @description Searches for the book you are looking at on Goodreads or Amazon across all your libby libraries. Forked from Dylancyclone's script.
// @author holyspiritomb
// @updateURL https://raw.githubusercontent.com/holyspiritomb/goodreads-libby-userscript/main/goodreads-libby.user.js
Expand Down Expand Up @@ -93,7 +93,7 @@
let libraries = JSON.parse(await GM.getValue("libraries", "[]"));
var previousBox;
if (unsafeWindow.location.host == "www.amazon.com") {
let findPreviousBox = () => document.getElementById("shopAllFormats_feature_div") || document.getElementById("bookDescription_feature_div");
let findPreviousBox = () => document.getElementById("shopAllFormats_feature_div") || document.getElementById("bookDescription_feature_div") || document.getElementById("followTheAuthor_feature_div");
previousBox = findPreviousBox();
} else if (unsafeWindow.location.host == "www.goodreads.com") {
previousBox = document.querySelector(".BookDetails");
Expand Down

0 comments on commit 022c0d4

Please sign in to comment.