Fandom Developers Wiki
(reply Γ—2)
(aw x2)
Line 8: Line 8:
   
 
== outsource styles ==
 
== outsource styles ==
βˆ’  
 
Hey OneTwoThreeFall,
 
Hey OneTwoThreeFall,
   
Line 15: Line 14:
 
Best regards,<br />'''Agent Zuri [[:User:Agent_Zuri|<span class="button">Profile</span>]] [[:User talk:Agent_Zuri|<span class="button">Message Wall</span>]] [[:User Blog:Agent Zuri|<span class="button">Blog</span>]]''' 14:13, February 12, 2019 (UTC)
 
Best regards,<br />'''Agent Zuri [[:User:Agent_Zuri|<span class="button">Profile</span>]] [[:User talk:Agent_Zuri|<span class="button">Message Wall</span>]] [[:User Blog:Agent Zuri|<span class="button">Blog</span>]]''' 14:13, February 12, 2019 (UTC)
 
:Hi! Most of the styles could be in a separate CSS file, however since a few are dynamic based on the page colours/directionality, there'd always be some CSS included in the JS. Therefore, I just include everything in the JS so the CSS isn't split over multiple files. I know it's a bit uglier, but I have tried to make sure they're readable in the JS! (with indentation, line breaks, etc.) - [[User:OneTwoThreeFall|OneTwoThreeFall]]&nbsp;<sup>[[User talk:OneTwoThreeFall|talk]]</sup> 14:39, February 12, 2019 (UTC)
 
:Hi! Most of the styles could be in a separate CSS file, however since a few are dynamic based on the page colours/directionality, there'd always be some CSS included in the JS. Therefore, I just include everything in the JS so the CSS isn't split over multiple files. I know it's a bit uglier, but I have tried to make sure they're readable in the JS! (with indentation, line breaks, etc.) - [[User:OneTwoThreeFall|OneTwoThreeFall]]&nbsp;<sup>[[User talk:OneTwoThreeFall|talk]]</sup> 14:39, February 12, 2019 (UTC)
  +
:Hi, okay, that's reasonable. Regarding theming, have you ever thought about using [[Less]]?
  +
:'''Agent Zuri [[:User:Agent_Zuri|<span class="button">Profile</span>]] [[:User talk:Agent_Zuri|<span class="button">Message Wall</span>]] [[:User Blog:Agent Zuri|<span class="button">Blog</span>]]''' 18:20, February 12, 2019 (UTC)
   
 
== Translation ==
 
== Translation ==
Line 23: Line 24:
 
Best regards,<br />'''Agent Zuri [[:User:Agent_Zuri|<span class="button">Profile</span>]] [[:User talk:Agent_Zuri|<span class="button">Message Wall</span>]] [[:User Blog:Agent Zuri|<span class="button">Blog</span>]]''' 14:13, February 12, 2019 (UTC)
 
Best regards,<br />'''Agent Zuri [[:User:Agent_Zuri|<span class="button">Profile</span>]] [[:User talk:Agent_Zuri|<span class="button">Message Wall</span>]] [[:User Blog:Agent Zuri|<span class="button">Blog</span>]]''' 14:13, February 12, 2019 (UTC)
 
:Thanks, I've added the German translation with a credit to you! Regarding using I18n-js, making a library depend on another (async) library can introduce unexpected issues - considering the i18n in QDmodal is only a single word, I'd rather just include it in JS to keep things simple. - [[User:OneTwoThreeFall|OneTwoThreeFall]]&nbsp;<sup>[[User talk:OneTwoThreeFall|talk]]</sup> 14:39, February 12, 2019 (UTC)
 
:Thanks, I've added the German translation with a credit to you! Regarding using I18n-js, making a library depend on another (async) library can introduce unexpected issues - considering the i18n in QDmodal is only a single word, I'd rather just include it in JS to keep things simple. - [[User:OneTwoThreeFall|OneTwoThreeFall]]&nbsp;<sup>[[User talk:OneTwoThreeFall|talk]]</sup> 14:39, February 12, 2019 (UTC)
  +
::Hi, you're right. Good point. (Y) '''Agent Zuri [[:User:Agent_Zuri|<span class="button">Profile</span>]] [[:User talk:Agent_Zuri|<span class="button">Message Wall</span>]] [[:User Blog:Agent Zuri|<span class="button">Blog</span>]]''' 18:20, February 12, 2019 (UTC)

Revision as of 18:20, 12 February 2019


Hook for scripts

Could this script fire a hook when initStyles has completed? I have scripts I'd want to use it in, but I'm at a loss for how to use the library. β€’ speedy β€’ πŸ””︎ β€’ πŸš€︎ β€’ 11:12, July 19, 2018 (UTC)

You shouldn't need to wait for initStyles to complete - the library is ready as soon as it has loaded. I can certainly add a hook though, since that's the convention of library scripts here.
To me, it seems odd to use a hook when you could load the script with $.ajax() and wait for the returned promise (see QDmodal#Usage). - OneTwoThreeFall talk 11:31, July 19, 2018 (UTC)

outsource styles

Hey OneTwoThreeFall,

I would look nicer if your styles would be outsourced and imported via importArticle() or importStylesheet().

Best regards,
Agent Zuri Profile Message Wall Blog 14:13, February 12, 2019 (UTC)

Hi! Most of the styles could be in a separate CSS file, however since a few are dynamic based on the page colours/directionality, there'd always be some CSS included in the JS. Therefore, I just include everything in the JS so the CSS isn't split over multiple files. I know it's a bit uglier, but I have tried to make sure they're readable in the JS! (with indentation, line breaks, etc.) - OneTwoThreeFall talk 14:39, February 12, 2019 (UTC)
Hi, okay, that's reasonable. Regarding theming, have you ever thought about using Less?
Agent Zuri Profile Message Wall Blog 18:20, February 12, 2019 (UTC)

Translation

Hey again,

The german translation for 'close' is 'Schließen' if you want to add it to your translations object. Or do you want to use i18n-js instead?

Best regards,
Agent Zuri Profile Message Wall Blog 14:13, February 12, 2019 (UTC)

Thanks, I've added the German translation with a credit to you! Regarding using I18n-js, making a library depend on another (async) library can introduce unexpected issues - considering the i18n in QDmodal is only a single word, I'd rather just include it in JS to keep things simple. - OneTwoThreeFall talk 14:39, February 12, 2019 (UTC)
Hi, you're right. Good point. (Y) Agent Zuri Profile Message Wall Blog 18:20, February 12, 2019 (UTC)