orz

Members
  • Posts

    33
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Release Notes

Bug Tracker

Help page

Help page-CN

Release Note5

Rules and recruitment

Release Note6

Posts posted by orz

  1. 4 hours ago, 7twenty said:

    I was (still am actually) having the same issue. Apparently they changed something on their backend.

    I was asked to create a new account and all my data would be transferred... still waiting!?

    not really. I can read Chinese so I logged in by extension.maxthon.cn :mdr:

  2. 4 hours ago, bayas said:

    Don't use local html file like panel.$.htm
    After the release of Maxthon 4.9.x, extension framework hasn't supported them. You must do it manually. For example;

    en.ini

    
    [lang]
    app.title=Title
    app.description=Description

    panel.htm

    
    <!DOCTYPE HTML>
    <html lang="en-US">
      <head>
        <meta charset="UTF-8">
        <title data-lang="app.title">Title</title>
      </head>
      <body>
        <div data-lang="app.description">Description</div>
      </body>
      <script type="text/javascript" src="js/jquery.min.js"></script>
      <script>
        
    	var rt = window.external.mxGetRuntime();
    	var i18n = rt.locale.t;
    	
    	jQuery(document).ready(function() {
    	  // localize.
    	  jQuery("[data-lang]").each(function(index, item) {
    	    var key = jQuery(this).attr("data-lang");
    	    jQuery(this).text(i18n(key));
    	  });
    	});
    	
      </script>
    </html>

     

    hmm, my panel.html can retrieve the text from en.ini file. However if I have another html like blocked.html, after I redirect current tab to this local html file, then locale cannot take any text from en.ini.

  3. That is good to know. Thanks a lot. I will try that out.

    One more question :-).  How can I access locale defined in en.ini file from a html defined in my extension? this local html is used for re-direction when a web url should be blocked. javascript embedded in that local html cannot load locale text from en.ini. Maybe I also missed something here?

  4. 14 minutes ago, bayas said:

    Thanks a lot, that is what I am looking for.

     

    1 hour ago, No.1MaxthonFan said:

    I've never done an extension so I don't know if this will help you or not so I'm just shooting in the dark here.  I just right clicked on the title of that one Extension and clicked on Property and this is what came up.  Is that what you are looking for?

    Extension.png

    I would like to know the url before I submit the extension. bayas has helped to answer my question.

    • Like 1
  5. Hi Alex,

    One question about usage of locale. I added an en.ini file, then in my javascripts, I do following:

    var rt = window.external.mxGetRuntime();

    var tt = rt.locale.t;

    alert(tt("THE_KEY_NAME"));

    but it does not work to resolve the value defined for THE_KEY_NAME in my en.ini

    [lang]
    THE_KEY_NAME=test name

    Could you please help? I am not sure where is the incorrect part here

    Thanks