Skip to content
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

Scripts metadata processing (proof-of-concept) #242

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

johnd0e
Copy link
Contributor

@johnd0e johnd0e commented Aug 28, 2019

  • wrapper: remove block with (confusing) message for plugins authors
    //PLUGIN AUTHORS: writing a plugin outside of the IITC build environment? if so, delete these lines!!
    //(leaving them in place might break the 'About IITC' page or break update checks)
    plugin_info.buildName = 'mobile';
    plugin_info.dateTimeVersion = '20190326.154826';
    plugin_info.pluginId = 'ap-stats';
    //END PLUGIN AUTHORS NOTE
  • put extra data into userscript header, which is available thru in GM_info.scriptMetaStr
    (passed to wrapper function as field of plugin_info arg)

Currently that data is used only in Aboit IITC window, to highlight non-standard plugins.

Based on #205 and #238, so see here only latest commit.

@johnd0e johnd0e added the WIP Work in progress || Proof of the concept label Aug 28, 2019
Use `unsafeWindow`, thus no need to 'inject script in site context' anymore.
- wrapper is simpler now
- no need to cut it out in mobile app
  (but we keep that code for all legacy plugins)
- whole `scriptMetaStr` is added to plugin_info, to be able to analyse more properties
- it's easier to debug plugins now
  To set breakpoints switch to Web Developer Tools' Debugger/Sources tab
  and find related script in Tampermonkey's list of `userscript.html?id=<guid>`
- it's possible to use GM_* functions directly (not in mobile app, for now)
  - https://wiki.greasespot.net/Greasemonkey_Manual:API
  - https://www.tampermonkey.net/documentation.php
@johnd0e johnd0e mentioned this pull request Mar 7, 2020
10 tasks
- simplify plugins info processing assuming that GM_info is correctly passed
  by userscript manager (previously iOS app had issues)
- wrapper: remove block with (confusing) message for plugins authors
- put extra data into userscript header, which is available thru in `GM_info.scriptMetaStr`
  (passed to wrapper function as field of `plugin_info` arg)
  Currently that data is used only in About IITC window, to highlight non-standard plugins.
@modos189 modos189 force-pushed the master branch 3 times, most recently from a34b800 to 7b9edd5 Compare December 12, 2020 07:21
@MysticJay MysticJay added the development general development issue label Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development general development issue WIP Work in progress || Proof of the concept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants