Comments (7)
And... one more update to re-enable the delete button... done and actually tested this time! 😸
from github-userscripts.
Sorry for the delay, here is the updated code:
// ==UserScript==
// @name GitHub Add Repo Name to Delete Dialog
// @version 0.2.0
// @description A userscript that adds your repo name to the delete dialog
// @license MIT
// @author Rob Garrison
// @namespace https://github.com/Mottie
// @match https://github.com/*/*/settings
// @run-at document-idle
// @require https://greasyfork.org/scripts/28721-mutations/code/mutations.js?version=1108163
// @icon https://assets-cdn.github.com/pinned-octocat.svg
// ==/UserScript==
(() => {
"use strict";
function addName() {
const dialog = document.querySelector("details-dialog[aria-label='Delete repository']");
if (dialog) {
const name = document.getElementById("rename-field");
if (name) {
dialog.querySelector("form[action$='delete'] .input-block").value = name.value;
const btn = dialog.querySelector("form[action$='delete'] .btn-danger");
btn.removeAttribute("disabled");
btn.removeAttribute("data-disable-invalid");
}
}
}
document.addEventListener("ghmo:container", addName);
addName();
})();
from github-userscripts.
Hi @Bluscream!
I don't know if I'd want to actually include this kind of userscript in this repo since it may cause some accidental deletions... but, I'll add it here for prosperity:
// ==UserScript==
// @name GitHub Add Repo Name to Delete Dialog
// @version 0.1.2
// @description A userscript that adds your repo name to the delete dialog
// @license MIT
// @author Rob Garrison
// @namespace https://github.com/Mottie
// @include https://github.com/*
// @run-at document-idle
// @require https://greasyfork.org/scripts/28721-mutations/code/mutations.js?version=597950
// @icon https://assets-cdn.github.com/pinned-octocat.svg
// ==/UserScript==
(() => {
"use strict";
function addName() {
const name = document.getElementById("rename_field");
if (name) {
document.querySelector("form[action$='delete'] .input-block").value = name.value;
const btn = document.querySelector("form[action$='delete'] .btn-danger");
btn.removeAttribute("disabled");
btn.removeAttribute("data-disable-invalid");
}
}
document.addEventListener("ghmo:container", addName);
addName();
})();
from github-userscripts.
Oops, I forgot to add the mutation observer... I've updated the code above.
from github-userscripts.
Thanks, that one works just fine :3
from github-userscripts.
Can anyone please update this to work with the new format for transfer/change visibility?
from github-userscripts.
They updated it again :(
from github-userscripts.
Related Issues (20)
- feature request? bug?: GitHub issue comments: support hiding linked commits HOT 5
- FireMonkey Compatibility
- Custom navigation formatting on github projects page HOT 6
- Github Title Notification is broken HOT 8
- Feature request: show source code structure (list of classes, methods, functions, etc.)
- "GitHub Diff Filename" only work when reloading on the diff page HOT 4
- Greasy Fork followup
- github-static-time: Option to show UTC HOT 5
- Mutations not firing when clicking "Pull Requests" tab
- GitHub Watcher issue: Some repositories are not uploading HOT 3
- scripts doesn't work when enter the page first time HOT 2
- Request: add script of README.md editor
- GitHub Sort Content no longer works when logged in HOT 3
- GitHub code folding - the last block does not get a folding arrow
- GitHub static time - prevent text wrapping?
- Open Extension Page is just broken now. HOT 6
- [Request]Filter Forks by Releases
- Github Image Preview not visible on repos
- [Feature Request] GitHub Static Time: Enhance Match to Fit Also Gists And More
- [Feature Request] GitHub Static Time: Also Process Lazy Loaded Content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-userscripts.