Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript:/*EpigraphicListExtractToHTML*/
- ((u, t) => {
- if (location.href !== (u = "https://db.edcs.eu/epigr/epi_ergebnis.php")) {
- if (confirm("This bookmarklet is only for website page with below URL:\n" + u + "\n\nOpen that page now?")) open(t);
- return
- }
- t = document.createElement("TABLE");
- document.querySelectorAll('a[href*="bilder.php"]').forEach((lnk, i, row, cell) => {
- (row = t.insertRow()).insertCell().textContent = i + 1;
- row.insertCell().textContent = lnk.textContent;
- cell = row.insertCell();
- lnk.href.match(/bild=([^&]+)/)[1].split(";").forEach((fn, m, e) => {
- if (fn !== "pp") {
- cell.appendChild(e = document.createElement("A")).href =
- "https://db.edcs.eu/epigr/bilder/" + fn + (!fn.includes(".jpg") && ".jpg" || "");
- e.textContent = e.href
- }
- });
- row.insertCell().textContent = lnk.parentNode.querySelector('a[href*="bilder.php"]~noscript+br').nextSibling.data.trim()
- });
- t = '\
- <!doctype html><html><head><!--source: ' + u + '--><meta charset="utf-8"><style>\
- body{font-family:sans-serif}table{width:100%}tr:nth-child(2n){background:#eee}\
- td{padding:.1em .2em;max-width:50vw;vertical-align:top;word-break:break-word}\
- td:first-child{text-align:right}a{display:block;margin-top:.3em}\
- a:nth-child(2n){background:#dde}\
- </style></head><body>' + t.outerHTML + '</body></html';
- open(URL.createObjectURL(new Blob([t], {type: "text/html"})));
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement