Skip to content

Commit

Permalink
1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
keb committed Sep 12, 2024
1 parent 7de5ace commit c0d876d
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 121 deletions.
12 changes: 8 additions & 4 deletions bin/enhanced-gog.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name enhanced-gog
// @namespace https://github.com/kevinfiol/enhanced-gog
// @version 1.5.2
// @version 1.5.3
// @description Enhanced experience on GOG.com
// @license MIT; https://raw.githubusercontent.com/kevinfiol/enhanced-gog/master/LICENSE
// @include http://*.gog.com/game/*
Expand Down Expand Up @@ -121,7 +121,7 @@
}

// src/config.js
var VERSION = "1.5.2";
var VERSION = "1.5.3";
var API_KEY = "d047b30e0fc7d9118f3953de04fa6af9eba22379";

// src/state.js
Expand Down Expand Up @@ -170,6 +170,11 @@
return left ? `${sign}${delimited_price}` : `${delimited_price}${sign}`;
};
};
var getUrlPart = (str) => {
const url = new URL(str);
const part = url.searchParams.get("url") || url.searchParams.get("URL");
return part.trim() || url;
};
var getDateStr = (timestamp) => {
const date = new Date(timestamp);
const month = date.getMonth() + 1;
Expand Down Expand Up @@ -310,10 +315,9 @@
let res = await request("GET", endpoint, { params });
if (Array.isArray(res)) {
bundles = res.map((bundle) => {
const url = new URL(bundle.url).searchParams.get("URL") || bundle.url;
return {
title: bundle.title,
url
url: getUrlPart(bundle.url)
};
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enhanced-gog",
"version": "1.5.2",
"version": "1.5.3",
"description": "enhances gog web experience",
"main": "src/index.js",
"author": "kevinfiol",
Expand Down
Loading

0 comments on commit c0d876d

Please sign in to comment.