Skip to content

Commit 1191cfb

Browse files
authored
Hide VSCode button when printing (Mottie#164)
Fixes Mottie#163 Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
1 parent c0919da commit 1191cfb

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Userscripts to add functionality to GitHub.
3636
| [GitHub hide own feed meta][hof-wiki] | | [install][hof-raw] | [GF][hof-gf] [OU][hof-ou] | 2017.12.21 | 2021.07.21 |
3737
| [GitHub html preview][ghp-wiki] | | [install][ghp-raw] | [GF][ghp-gf] [OU][ghp-ou] | 2019.03.29 | 2021.07.21 |
3838
| [GitHub image preview][ipv-wiki] | | [install][ipv-raw] | [GF][ipv-gf] [OU][ipv-ou] | 2016.05.17 | 2021.11.30 |
39-
| [GitHub in VSCode][ivs-wiki] | | [install][ivs-raw] | [GF][ivs-gf] [OU][ivs-ou] | 2021.02.11 | 2021.07.21 |
39+
| [GitHub in VSCode][ivs-wiki] | | [install][ivs-raw] | [GF][ivs-gf] [OU][ivs-ou] | 2021.02.11 | 2022.01.05 |
4040
| [GitHub indent comments][ioc-wiki] | | [install][ioc-raw] | [GF][ioc-gf] [OU][ioc-ou] | 2017.03.15 | 2021.07.21 |
4141
| [GitHub issue add details][iad-wiki] | | [install][iad-raw] | [GF][iad-gf] [OU][iad-ou] | 2018.01.05 | 2021.11.30 |
4242
| [GitHub issue comments][ic1-wiki] | | [install][ic1-raw] | [GF][ic1-gf] [OU][ic1-ou] | 2016.04.04 | 2021.07.21 |

github-in-vscode.user.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// ==UserScript==
22
// @name GitHub in VSCode
3-
// @version 0.1.2
3+
// @version 0.1.3
44
// @description A userscript that adds a button to open a repo in VSCode using github1s
55
// @license MIT
66
// @author Rob Garrison
77
// @namespace https://github.com/Mottie
88
// @include https://github.com/*
99
// @run-at document-idle
10-
// @grant none
10+
// @grant GM_addStyle
1111
// @connect github.com
1212
// @connect githubusercontent.com
1313
// @require https://greasyfork.org/scripts/398877-utils-js/code/utilsjs.js?version=952600
@@ -75,6 +75,7 @@
7575
const margin = goToFile.classList.contains("mr-2") ? "mr-2" : "ml-2";
7676
const link = make({
7777
el: "a",
78+
id: "github-in-vscode",
7879
className: `ghiv-link btn ${margin} tooltipped tooltipped-n`,
7980
attrs: {
8081
href: `https://github1s.com${window.location.pathname}`,
@@ -85,6 +86,7 @@
8586
html: vsCodeIcon
8687
});
8788
goToFile.before(link);
89+
GM_addStyle("@media print { #github-in-vscode { display: none; } }");
8890
}
8991

9092
on(document, "ghmo:container pjax:end", init);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "github-userscripts",
3-
"version": "1.0.298",
3+
"version": "1.0.299",
44
"description": "Userscripts to add functionality to GitHub",
55
"license": "MIT",
66
"repository": "Mottie/GitHub-userscripts",

0 commit comments

Comments
 (0)