Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Modding:Mod compatibility/entry
(view source)
Revision as of 01:09, 6 August 2019
927 bytes removed
,
01:09, 6 August 2019
remove obsolete script
Line 309:
Line 309:
| The mod is no longer needed and should be removed.
| The mod is no longer needed and should be removed.
|}
|}
−
−
==Script==
−
This script generates the template call when run from a Nexus or Chucklefish mod page.
−
<source lang="javascript">
−
switch(location.host)
−
{
−
case "www.nexusmods.com":
−
var url = location.origin + location.pathname.replace(/\/*$/, '');
−
var name = $(".header-name").text();
−
var author = $(".uploader a").text();
−
var author2 = $(".header-author strong").text();
−
break;
−
−
case "community.playstarbound.com":
−
var url = location.origin + location.pathname.replace(/\/*$/, '');
−
var name = $.trim($("h1:first").contents().first().text());
−
var author = $(".primaryContent[data-author]:first").attr("data-author");
−
break;
−
−
default:
−
throw `Unknown domain: ${location.host}`;
−
}
−
−
var template = `
−
{{/entry
−
|name = ${name}
−
|author = ${author}`;
−
if(author2 && author2 != author)
−
template += `, ${author2}`;
−
template += `
−
|url = ${url}
−
|status = ok
−
|summary =
−
|source =
−
}}
−
`;
−
</source>
[[de:Modding:SMAPI Kompatibilität/entry]]
[[de:Modding:SMAPI Kompatibilität/entry]]
Pathoschild
translators
8,403
edits
Navigation menu
Personal tools
Create account
Log in
Namespaces
Modding
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Admin noticeboard
Help Editing
Random page
Official Links
Official Site
Official Forums
Official Merchandise
Discord
Reddit
Tools
Upload file
Special pages
Printable version