From ed26d9219d2dfbb1d1e63201d915ffde6f06573d Mon Sep 17 00:00:00 2001 From: Jimmy Berry Date: Mon, 13 May 2019 17:36:35 -0500 Subject: [PATCH] userscript/origin: do not show failed when no OriginConfig. Rather it should be assumed that the project does not intend to have origin information. --- userscript/origin.user.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/userscript/origin.user.js b/userscript/origin.user.js index 2c113375..745032ce 100644 --- a/userscript/origin.user.js +++ b/userscript/origin.user.js @@ -22,7 +22,11 @@ $('ul.clean_list, ul.list-unstyled').append('
  • loading origin...
  • '); $.get({url: url, crossDomain: true, xhrFields: {withCredentials: true}, success: function(origin) { if (origin.endsWith('failed')) { - $('#osrt-origin').html(' failed to get origin info'); + if (origin.startsWith('OSRT:OriginConfig attribute missing')) { + $('#osrt-origin').html(''); + } else { + $('#osrt-origin').html(' failed to get origin info'); + } } else { project = origin.trim(); if (project.endsWith('~')) {