Skip to content

Relative library urls inconsistent #502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Martii opened this issue Jan 4, 2015 · 1 comment · Fixed by #591
Closed

Relative library urls inconsistent #502

Martii opened this issue Jan 4, 2015 · 1 comment · Fixed by #591
Labels
bug You've guessed it... this means a bug is reported. CODE Some other Code related issue and it should clearly describe what it is affecting in a comment. UI Pertains inclusively to the User Interface.
Milestone

Comments

@Martii
Copy link
Member

Martii commented Jan 4, 2015

One or more bugs exist when using relative urls with @require

Using this as a Unit Test
Using this as a Unit Test Library

Bug A:

  • Assuming this should happen... listing of scripts using the library is missing and visa-versa e.g. "Scripts Using This Library" and "Libraries Used". If Bug B is intendend behavior then this becomes a bug.

Bug B:

  • Assuming this is a bug... library relative urls use same path as userscript urls e.g. GM_setStyle.js resolves from relative to absolute of https://openuserjs.org/install/Marti/GM_setStyle.js instead of https://openuserjs.org/src/libs/Marti/GM_setStyle.js. Interesting feature that might be useful but previously undetected.

Related to:

@Martii Martii added bug You've guessed it... this means a bug is reported. CODE Some other Code related issue and it should clearly describe what it is affecting in a comment. labels Jan 4, 2015
@Martii Martii added this to the #135 milestone Jan 4, 2015
@Martii Martii added the UI Pertains inclusively to the User Interface. label Jan 4, 2015
Martii pushed a commit to Martii/OpenUserJS.org that referenced this issue Feb 25, 2015
* Change regular expression to handle available and known relative site urls for libraries
* Change "Libraries Used" to only showcase found libraries and never user.js
* Some STYLEGUIDE.md conformance

**NOTES**:
* Since we store `uses` changes will become effective on next script update unless modified by someone with those privileges.
* Maintains current GM/GMP compatibility with this

Closes OpenUserJS#502
@Martii
Copy link
Member Author

Martii commented Feb 25, 2015

Bug A has been presumed as precedent here due to lack of any feedback.

Martii added a commit to Martii/OpenUserJS.org that referenced this issue Jul 24, 2018
* Fix bug on Issue page when isSameOrigin ... no need to display
* Fix bug *(A)* on relative library ... post OpenUserJS#502
* Fill in some other areas with this migration
* Reuse some of the code where applicable
* Set some more DOM client-side to experimental `referrerpolicy'
* Some STYLEGUIDE.md reconformance ... break after operators

NOTES:
* Test patterns for relative libs *(needs GM4 testing but pre passes)*

``` js
// These typically should show
// @require       http://localhost:8080/src/libs/Marti/GM_setStyle.js
// @require       //localhost:8080/src/libs/Marti/GM_setStyle.js
// @require       /src/libs/Marti/GM_setStyle.js

// These typically should not show
// @require       localhost:8080/src/libs/Marti/GM_setStyle.js
// @require       Marti/GM_setStyle.js
// @require       GM_setStyle.js

```

* One more legacy URL API to migrate to WHATWG API ... need some of this PR in the wild for live tests
* Still needs possible local pro changes ... that is probably system wide and "big"... so will isolate

Post OpenUserJS#1508
@Martii Martii mentioned this issue Jul 24, 2018
Martii added a commit that referenced this issue Jul 24, 2018
* Fix bug on Issue page when isSameOrigin ... no need to display
* Fix bug *(A)* on relative library ... post #502
* Fill in some other areas with this migration
* Reuse some of the code where applicable
* Set some more DOM client-side to experimental `referrerpolicy'
* Some STYLEGUIDE.md reconformance ... break after operators

NOTES:
* Test patterns for relative libs *(needs GM4 testing but pre passes)*

``` js
// These typically should show
// @require       http://localhost:8080/src/libs/Marti/GM_setStyle.js
// @require       //localhost:8080/src/libs/Marti/GM_setStyle.js
// @require       /src/libs/Marti/GM_setStyle.js

// These typically should not show
// @require       localhost:8080/src/libs/Marti/GM_setStyle.js
// @require       Marti/GM_setStyle.js
// @require       GM_setStyle.js

```

* One more legacy URL API to migrate to WHATWG API ... need some of this PR in the wild for live tests
* Still needs possible local pro changes ... that is probably system wide and "big"... so will isolate

Post #1508
Martii added a commit to Martii/OpenUserJS.org that referenced this issue Jul 22, 2019
* This is quite "picky" between the .user.js engines so match that same "pickyness".

Post OpenUserJS#502
@Martii Martii mentioned this issue Jul 22, 2019
Martii added a commit that referenced this issue Jul 22, 2019
* This is quite "picky" between the .user.js engines so match that same "pickyness".

Post #502

Auto-merge
@OpenUserJS OpenUserJS locked as resolved and limited conversation to collaborators Apr 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug You've guessed it... this means a bug is reported. CODE Some other Code related issue and it should clearly describe what it is affecting in a comment. UI Pertains inclusively to the User Interface.
Development

Successfully merging a pull request may close this issue.

1 participant