Skip to content

Instantly share code, notes, and snippets.

@yetithefoot
Created February 12, 2014 01:43
Show Gist options
  • Save yetithefoot/8948402 to your computer and use it in GitHub Desktop.
Save yetithefoot/8948402 to your computer and use it in GitHub Desktop.
sort github issue labels
(function sort_labels(){
var issues = document.querySelector(".color-label-list");
var issue_1hrs = issues.querySelector("li[data-name='1hrs']");
var issue_2hrs = issues.querySelector("li[data-name='2hrs']");
var issue_4hrs = issues.querySelector("li[data-name='4hrs']");
var issue_8hrs = issues.querySelector("li[data-name='8hrs']");
var issue_30min = issues.querySelector("li[data-name='30min']");
var issue_backend = issues.querySelector("li[data-name='backend']");
var issue_frontend = issues.querySelector("li[data-name='frontend']");
var issue_edit = issues.querySelector("li[data-name='edit.pics.io']");
var issue_live = issues.querySelector("li[data-name='live.pics.io']");
var issue_raw = issues.querySelector("li[data-name='raw.pics.io']");
var issue_picsio = issues.querySelector("li[data-name='pics.io']");
var issue_low = issues.querySelector("li[data-name='low']");
var issue_medium = issues.querySelector("li[data-name='middle']");
var issue_high = issues.querySelector("li[data-name='high']");
var issue_later = issues.querySelector("li[data-name='later']");
var issue_bug = issues.querySelector("li[data-name='bug']");
var issue_feature = issues.querySelector("li[data-name='feature']");
var issue_design = issues.querySelector("li[data-name='design']");
var issue_config = issues.querySelector("li[data-name='config']");
var issue_grammar = issues.querySelector("li[data-name='grammar']");
var issue_FB = issues.querySelector("li[data-name='FB']");
var issue_inprogress = issues.querySelector("li[data-name='in progress']");
while (issues.hasChildNodes()) {
issues.removeChild(issues.lastChild);
}
var margin = "15px";
issues.appendChild(issue_backend);
issues.appendChild(issue_frontend);
issue_frontend.style["margin-bottom"] = margin;
issues.appendChild(issue_bug);
issues.appendChild(issue_feature);
issue_feature.style["margin-bottom"] = margin;
issues.appendChild(issue_high);
issues.appendChild(issue_medium);
issues.appendChild(issue_low);
issues.appendChild(issue_later);
issue_later.style["margin-bottom"] = margin;
issues.appendChild(issue_inprogress);
issue_inprogress.style["margin-bottom"] = margin;
issues.appendChild(issue_1hrs);
issues.appendChild(issue_2hrs);
issues.appendChild(issue_4hrs);
issues.appendChild(issue_8hrs);
issues.appendChild(issue_30min);
issue_30min.style["margin-bottom"] = margin;
issues.appendChild(issue_design);
issues.appendChild(issue_config);
issues.appendChild(issue_grammar);
issues.appendChild(issue_FB);
})();
@yetithefoot
Copy link
Author

@yetithefoot
Copy link
Author

I use JavaScript Injector by Nicholas Workshop for executing these scripts.
https://chrome.google.com/webstore/detail/javascript-injector-nicho/abdogfafejmdomllalkdegagoehgbdbk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment