Browse Source

Properly link to the source for an image.

tags/v0.1.0
Fen Dweller 6 years ago
parent
commit
a8ca7487ac
2 changed files with 23 additions and 1 deletions
  1. +5
    -1
      macrovision.js
  2. +18
    -0
      media/attribution.js

+ 5
- 1
macrovision.js View File

@@ -714,7 +714,11 @@ function displayAttribution(file) {
} else if (source === undefined) { } else if (source === undefined) {
sourceHolder.innerText = "Not yet entered"; sourceHolder.innerText = "Not yet entered";
} else { } else {
sourceHolder.innerText = source;
sourceHolder.innerHTML = "";
const link = document.createElement("a");
link.href = source;
link.innerText = new URL(source).host;
sourceHolder.appendChild(link);
} }
} }




+ 18
- 0
media/attribution.js View File

@@ -22,12 +22,30 @@ const attributionData = {
authors: [ authors: [
"chemicalcrux" "chemicalcrux"
] ]
},
{
prefix: "./media/characters/abysgar/",
files: [
{ name: "front.svg", source: "https://www.furaffinity.net/view/32424108/"}
],
authors: [
"clown-grin",
"labratkuma"
]
} }
], ],
authors: { authors: {
"chemicalcrux": { "chemicalcrux": {
name: "chemicalcrux", name: "chemicalcrux",
url: "https://www.furaffinity.net/user/chemicalcrux" url: "https://www.furaffinity.net/user/chemicalcrux"
},
"clown-grin": {
name: "clown-grin",
url: "https://www.furaffinity.net/user/clown-grin"
},
"labratkuma": {
name: "labratkuma",
url: "https://www.furaffinity.net/user/labratkuma"
} }
} }
} }


Loading…
Cancel
Save