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
Copy file name to clipboardExpand all lines: README.md
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Follow the steps on [Chrome's "Getting Started" tutorial](https://developer.chro
28
28
- The extension may say it contains errors and then highlight a permission called "contextualIdentities": 
29
29
- It's safe to ignore, as it's a permission meant for Firefox users, but does not affect Chrome / Brave.
30
30
31
-
These steps MAY work on Microsoft Edge (the new version), but no guarantees.
31
+
These steps MAY work on Microsoft Edge, but no guarantees.
32
32
33
33
## How to use
34
34
@@ -49,13 +49,29 @@ For example:
49
49
50
50
### Preview
51
51
52
-
Screenshot as of extension version v1.0.3.
52
+
Screenshot as of extension version v1.0.3, which means it's slightly outdated.
53
53
A few things to note:
54
54
-`auth_hash`, `auth_uniq_`, `email` and `password` are _typically empty_. Don't panic if they don't have any values, as it's completely normal.
55
55
- The `username` field is by default set to "u" plus the same number as `auth_id`. It _does not_ need to be your actual OnlyFans username.
56
56
57
57

58
58
59
+
## Permissions
60
+
61
+
Overview of permissions and why they're required.
62
+
63
+
-`cookies`
64
+
- Values such as `auth_id` and `sess` are contained within cookies.
65
+
- Keep in mind that the `cookies` permission only applies for `onlyfans.com` and no other websites.
66
+
-`clipboardWrite`
67
+
- To copy the `auth.json` values into your clipboard
68
+
-`storage`
69
+
- This is specifically just to "synchronize" the `x_bc` value to the popup (so it can be copied).
70
+
-`x_bc` isn't available via the regular `cookies` permission, so we need a workaround (which utilizes the `storage` permission).
71
+
-`contextualIdentities`
72
+
- On Firefox, it's used to support multi-account containers.
73
+
- On Chromium-based browsers (Google Chrome, Brave, Microsoft Edge etc.) it does nothing. However, it will give a warning (that you can ignore).
* If authId isn't specified, user is not logged into
@@ -125,17 +145,41 @@ async function grabCookies(cookieStoreId) {
125
145
errorMessage=`Could not find valid cookie values in container: <strong>${containerName}</strong><br>Make sure you are logged into OnlyFans.`;
126
146
}
127
147
128
-
jsonElement.innerHTML=errorMessage;
148
+
errorElement.innerHTML=errorMessage;
149
+
errorElement.classList.remove('hidden');
150
+
151
+
if(!copyBtn.classList.contains('hidden')){
152
+
copyBtn.classList.add('hidden');
153
+
jsonElement.classList.add('hidden');
154
+
}
155
+
156
+
return;
157
+
}
158
+
159
+
// See `background/background.js` as to why we use `st` here
160
+
constst=mappedCookies.st;
161
+
constbcToken=awaitgetBcTokenSha(st);
162
+
if(!bcToken){
163
+
leterrorMessage='Could not find valid x_bc value. Please open OnlyFans.com once and make sure it fully loads.';
164
+
if(containersEnabled){
165
+
constcontainerName=containerNames[cookieStoreId]||'Default (no container)';
166
+
errorMessage=`Could not find valid x_bc value. Please open OnlyFans.com once in container: <strong>${containerName}</strong><br>Make sure it fully loads. If you are not logged in, please log in and <i>refresh the page</i>.`;
167
+
}
168
+
169
+
errorElement.innerHTML=errorMessage;
170
+
errorElement.classList.remove('hidden');
171
+
129
172
if(!copyBtn.classList.contains('hidden')){
130
173
copyBtn.classList.add('hidden');
131
-
jsonElement.classList.add('red');
174
+
jsonElement.classList.add('hidden');
132
175
}
133
176
134
177
return;
135
178
}
136
179
137
180
copyBtn.classList.remove('hidden');
138
-
jsonElement.classList.remove('red');
181
+
jsonElement.classList.remove('hidden');
182
+
errorElement.classList.add('hidden');
139
183
140
184
/**
141
185
* Fill out the object that OnlyFans excepts
@@ -145,6 +189,7 @@ async function grabCookies(cookieStoreId) {
0 commit comments