Improve docs hovercard and nonstandard notice

This commit is contained in:
Matthew Holt 2021-10-12 14:51:36 -06:00
parent 773e99ec6e
commit f3f21afac0
2 changed files with 5 additions and 4 deletions

View file

@ -164,13 +164,11 @@ function beginRenderingInto($tpl, moduleID, module) {
// show notice if module is non-standard
if (module.repo) {
if (isStandard(module.structure.type_name)) {
$('.nonstandard-notice', $tpl).remove();
} else {
if (!isStandard(module.structure.type_name)) {
let { pkg, _ } = splitTypeName(module.structure.type_name);
$('.nonstandard-project-link', $tpl).attr('href', module.repo).text(module.repo);
$('.nonstandard-package-path', $tpl).text(pkg);
$('.nonstandard-notice', $tpl).prepend(nonStandardFlag);
$('.nonstandard-notice', $tpl).prepend(nonStandardFlag).show();
}
var $repoName = $('<span/>').text(stripScheme(module.repo));