Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
uchks committed Oct 6, 2024
1 parent 151a74d commit 38581a3
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 37 deletions.
27 changes: 13 additions & 14 deletions depictions/web/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@
src="js/content-blocks-changelog.js"
></script>
<script type="text/javascript">
bundleid = $.QueryString["p"];
const bundleid = $.QueryString.p;
const contentBlocks = getContentBlocks();

var contentBlocks = getContentBlocks();

$(document).ready(function () {
$(document).ready(() => {
populateContentBlocks(
bundleid + "/changelog.xml",
`${bundleid}/changelog.xml`,
contentBlocks,
() => {
$("#packageError").show();
Expand Down Expand Up @@ -68,16 +67,16 @@
</div>
<!-- REPO FOOTER -->
<script type="text/javascript">
var repoContents = {
const repoContents = {
"#repoFooterLinks": {
type: "custom",
source: "repo>footerlinks>link",
render: function (element, source) {
$.each(source, function (index, data) {
var a = $("<a class='link-item list-group-item'>");
render: (element, source) => {
$.each(source, (index, data) => {
const a = $("<a class='link-item list-group-item'>");
a.attr("href", $(data).find("url").text());
if ($(data).find("iconclass")) {
var i = $("<span>");
const i = $("<span>");
i.attr("class", $(data).find("iconclass").text());
console.log(i);
$(a).append(i);
Expand All @@ -88,23 +87,23 @@
}, //render
},
};
$(document).ready(function () {
$(document).ready(() => {
$.ajax({
type: "GET",
dataType: "xml",
url: "../../repo.xml",
cache: false,
success: function (xml) {
success: (xml) => {
data_loader_engine(repoContents, xml);
if (navigator.userAgent.search(/Cydia/) != -1) {
if (navigator.userAgent.search(/Cydia/) !== -1) {
$("a").each(function () {
console.log($(this).text());
$(this).attr("target", "_blank");
});
}
},

error: function () {
error: () => {
$("#contactInfo").hide();
},
}); //ajax
Expand Down
2 changes: 1 addition & 1 deletion depictions/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
</style>
<script>
$(() => {
const bundleid = $.QueryString["p"];
const bundleid = $.QueryString.p;
const contentBlocks = getContentBlocks();

populateContentBlocks(
Expand Down
6 changes: 2 additions & 4 deletions depictions/web/js/content-blocks-index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
function setBundleId(id) {
bundleid = id;
}

function getContentBlocks() {
const bundleid = $.QueryString.p;

return {
"#packageName": {
type: "text",
Expand Down
7 changes: 3 additions & 4 deletions depictions/web/js/content-blocks-screenshots.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
function setBundleId(id) {
bundleid = id;
}

function getContentBlocks() {
const bundleid = $.QueryString.p;

return {
"#screenshotsList": {
type: "custom",
Expand All @@ -16,6 +14,7 @@ function getContentBlocks() {
);
return;
}

$.each(source, (index, data) => {
const th = $("<div class='thumbnail'>");
th.append($("<p>").text($(data).find("description").text()));
Expand Down
27 changes: 13 additions & 14 deletions depictions/web/screenshots.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@
src="js/content-blocks-screenshots.js"
></script>
<script type="text/javascript">
bundleid = $.QueryString["p"];
const bundleid = $.QueryString.p;
const contentBlocks = getContentBlocks();

var contentBlocks = getContentBlocks();

$(document).ready(function () {
$(document).ready(() => {
//return;
populateContentBlocks(
bundleid + "/info.xml",
`${bundleid}/info.xml`,
contentBlocks,
() => {
$("#packageError").show();
Expand Down Expand Up @@ -72,16 +71,16 @@ <h5>SCREENSHOTS</h5>
</div>
<!-- REPO FOOTER -->
<script type="text/javascript">
var repoContents = {
const repoContents = {
"#repoFooterLinks": {
type: "custom",
source: "repo>footerlinks>link",
render: function (element, source) {
$.each(source, function (index, data) {
var a = $("<a class='link-item list-group-item'>");
render: (element, source) => {
$.each(source, (index, data) => {
const a = $("<a class='link-item list-group-item'>");
a.attr("href", $(data).find("url").text());
if ($(data).find("iconclass")) {
var i = $("<span>");
const i = $("<span>");
i.attr("class", $(data).find("iconclass").text());
console.log(i);
$(a).append(i);
Expand All @@ -92,22 +91,22 @@ <h5>SCREENSHOTS</h5>
}, //render
},
};
$(document).ready(function () {
$(document).ready(() => {
$.ajax({
type: "GET",
dataType: "xml",
url: "../../repo.xml",
cache: false,
success: function (xml) {
success: (xml) => {
data_loader_engine(repoContents, xml);
if (navigator.userAgent.search(/Cydia/) != -1) {
if (navigator.userAgent.search(/Cydia/) !== -1) {
$("a").each(function () {
console.log($(this).text());
$(this).attr("target", "_blank");
});
}
},
error: function () {
error: () => {
$("#contactInfo").hide();
},
}); //ajax
Expand Down

0 comments on commit 38581a3

Please sign in to comment.