File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
( ( browser ) => {
17
+
17
18
let DEBUG = false ;
18
19
19
20
const log = ( ...args ) => {
47
48
return url ;
48
49
} else {
49
50
reportFailure ( result . status ) ;
50
- return `Could not create URL ${ result . status } ` ;
51
+ return `Oops! Unable to create link. ${ result . status } ` ;
51
52
}
52
53
} ;
53
54
71
72
72
73
const reportFailure = ( status ) => {
73
74
const statusCodes = {
74
- 1 : 'INVALID_SELECTION: The selection provided could not be used.' ,
75
-
76
- 2 : 'AMBIGUOUS: No unique fragment could be identified for this selection.' ,
77
- 3 : 'TIMEOUT: Computation could not complete in time.' ,
78
- 4 : 'EXECUTION_FAILED: Unknown error.' ,
75
+ 1 : 'INVALID_SELECTION: ❌ The selected text is too short or does not contain enough valid words. Please choose a longer or more specific phrase.' ,
76
+ 2 : 'AMBIGUOUS:❌ The selected text appears multiple times on this page and no unique link could be created. Try selecting a different text segment.' ,
77
+ 3 : 'TIMEOUT: ⏳ The process took too long. This may be due to a large page size or slow browser performance. Try selecting a different text segment.' ,
78
+ 4 : 'EXECUTION_FAILED: ⚠️ An unexpected error occurred while generating the link.
79
79
} ;
80
80
81
81
window . queueMicrotask ( ( ) => {
You can’t perform that action at this time.
0 commit comments