Skip to content

Commit

Permalink
BM and GH fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
avindra committed Dec 20, 2021
1 parent 7e89d77 commit 6535d75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion britishmuseum.org/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Repair legacy ASPX link by redirecting
* to search
*/
if (location.pathname === "/research/search_the_collection_database/search_object_details.aspx") {
if (/\/research\/search_the_collection_database\/search_object_(?:details|image).aspx/.test(location.pathname)) {
const params = new URLSearchParams(location.search.substring(1));
const oid = params.get('objectId') || params.get('objectid');
if (oid) {
Expand Down
2 changes: 1 addition & 1 deletion github.com/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ onBrowse(() => {
const fileMatch = location.pathname.match(fileRegex);

if (fileMatch) {
const btns = document.querySelector(".BtnGroup");
const btns = document.querySelector(".repository-content .BtnGroup");
if (btns) {
const [, user, repo, branch, file] = fileMatch;

Expand Down

0 comments on commit 6535d75

Please sign in to comment.