You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes:
* Added Postman v9.x.x support
* Simplified usage [pass one argument to postman folder instead of requester.js or app.asar]
* Simplified patching process
* Added -v flag to enable verbose output
* Updated dependencies
Copy file name to clipboardExpand all lines: README.md
+9-46Lines changed: 9 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Postman Scratchpad Banner Fix
2
-
### Remove Scratchpad Banner from Postman 8.x.x
2
+
### Remove Scratchpad Banner from Postman 8.x.x and 9.x.x
3
3
4
4
# Description
5
5
Starting from [Postman](https://www.postman.com/) v8, working locally in scratchpad mode introduces this annoying banner which can't be disabled completely.
@@ -8,69 +8,32 @@ Starting from [Postman](https://www.postman.com/) v8, working locally in scratch
8
8
9
9
Therefore, I've created this repo to solve the problem, I've patched postman files to disable the scratchpad banner
10
10
11
-
Tested on Postman versions from *`8.1.0`* to *`8.10.0`*
11
+
Tested on Postman versions from *`8.1.0`* to *`9.3.1`*
* Clone this repo `git clone https://github.com/3omar-mostafa/Postman-Scratchpad-Banner-Fix.git`
16
16
*`cd Postman-Scratchpad-Banner-Fix`
17
17
* Run ***`npm install`*** to install dependencies
18
18
19
-
# Linux
20
19
# Usage
21
20
## Patch your already installed postman
22
-
Run ***`node fix.js -r ${requester_js}`*** , where ***`${requester_js}`*** is Postman file (***`requester.js`***) which renders scratchpad banner
23
-
24
-
### requester.js path:
25
-
It can be found on path like this: ***`${Postman_install_dir}/resources/app/js/requester.js`***
21
+
Run ***`node fix.js -p ${postman_dir}`*** , where ***`${postman_dir}`*** is Postman installation directory
26
22
27
23
## Download patched postman
28
-
You can find downloads for linux and macos at [Releases](https://github.com/3omar-mostafa/Postman-Scratchpad-Banner-Fix/releases)
29
-
30
-
# MacOS
31
-
# Usage
32
-
## Patch your already installed postman
33
-
34
-
* For Postman version `8.0.0` to `8.10.0`
35
-
* Run ***`node fix.js -r ${requester_js}`*** , where ***`${requester_js}`*** is Postman file (***`requester.js`***) which renders scratchpad banner
36
-
****`${requester_js}`*** can be found on path like this: ***`${Postman_install_dir}/Contents/Resources/app/js/requester.js`***
37
-
38
-
* For Postman version `8.11.0` or above
39
-
* Run ***`node fix.js -a ${app_asar}`*** , where ***`${app_asar}`*** is Postman file (***`app.asar`***) which is like a `tar` archive and contains most of postman's files
40
-
****`${app_asar}`*** can be found on path like this: ***`${Postman_install_dir}/Contents/Resources/app.asar`***
41
-
* You can learn more about *`asar`* file format [from here](https://github.com/electron/asar).
42
-
43
-
## Download patched postman
44
-
You can find downloads for linux and macos at [Releases](https://github.com/3omar-mostafa/Postman-Scratchpad-Banner-Fix/releases)
45
-
46
-
# Windows
47
-
# Usage
48
-
## Patch your already installed postman
49
-
Run ***`node fix.js -a ${app_asar}`*** , where ***`${app_asar}`*** is Postman file (***`app.asar`***) which is like a `tar` archive and contains most of postman's files
50
-
51
-
### app.asar path:
52
-
It can be found on path like this: ***`%localappdata%\Postman\app-8.10.0\resources\app.asar`***
53
-
54
-
You can learn more about *`asar`* file format [from here](https://github.com/electron/asar).
55
-
56
-
## Download patched postman
57
-
Windows is not included because its installer is *`exe`* file which I can extract and patch the files, but unfortunately I can not re-create the same installer, but you can still patch you existing installation
24
+
* You can find downloads for Linux and MacOS at [Releases](https://github.com/3omar-mostafa/Postman-Scratchpad-Banner-Fix/releases)
25
+
* Windows is not included because its installer is *`exe`* file which I can extract and patch the files, but unfortunately I can not re-create the same installer, but you can still patch you existing installation
58
26
59
27
# Methodology and Manual Patching
60
-
The file which is responsible for displaying scratchpad banner is ***`requester.js`***
28
+
* There are some files which are responsible for displaying scratchpad banner as ***`requester.js`*** and ***`scratchpad.js`*** in newer versions
29
+
* These files contains ***`getWorkingInScratchpadBanner`*** , ***`getScratchpadBannerMode`*** functions and ***`SHOW_BANNER_IN_SCRATCHPAD`*** flag
61
30
62
-
I've made three changes to the file (they are redundant and any one of them is enough, but made three for more reliability)
31
+
I've made changes to these files
63
32
64
33
****`getWorkingInScratchpadBanner`***
65
34
* Modified this function to automatically close the scratchpad banner instead of creating it, using ***`this.closeBanner()`*** function call
66
35
67
-
****`SHOW_BANNER_IN_SCRATCHPAD`***
68
-
* Modified this constant to equal ***`HIDE_SCRATCHPAD_BANNER`*** instead
* Modified this object to return ***`HIDE_SCRATCHPAD_BANNER`*** instead
72
-
73
-
If you are on windows/macos, you can use [asar](https://github.com/electron/asar#command-line-utility) to extract ***`app.asar`*** and modify ***`requester.js`*** then repack it again
36
+
If you are on windows/macos, you may find no code in Postman installation directory, instead you may find ***`app.asar`*** file (which is like a tar archive file) and you can use [asar](https://github.com/electron/asar#command-line-utility) to extract ***`app.asar`*** and modify the files then repack it again
74
37
75
38
# Notes
76
39
This repo use github actions to automate checking for new releases every month, also can run manually for custom version
0 commit comments