Files
userscripts/redmine_enhancer.user.js
2017-12-14 08:53:51 +01:00

27 lines
882 B
JavaScript

// ==UserScript==
// @name Redmine Enhancer
// @namespace https://www.cocus.de/
// @version 0.2.3
// @description try to take over the world, or at least redmine!
// @author Jens Dietze, COCUS
// @encoding utf-8
// @license https://creativecommons.org/licenses/by-sa/4.0/
// @match https://redmine.cocus.com/
// @match https://redmine.cocus.com/my/page
// @updateURL https://git.jdsv.de/snippets/1
// @downloadURL https://git.jdsv.de/snippets/1
// @grant none
// ==/UserScript==
(function() {
'use strict';
$(document).ready(function() {
var url = 'https://redmine.cocus.com/issues?query_id=84';
if ($('#account ul li').size() == 1) {
window.location.href = 'https://redmine.cocus.com/login?back_url=' + decodeURI(url);
} else {
window.location.href = url;
}
});
})();