×

Give a tip

bayas

Members
  • Posts

    53
  • Joined

  • Last visited

  • Days Won

    8

 Content Type 

Profiles

Forums

Release Notes

Bug Tracker

Help page

Help page-CN

Release Note5

Rules and recruitment

Release Note6

Posts posted by bayas

  1. On 24.05.2019 at 2:12 AM, rick.lane said:

    MX 5.3.8.x versions are still very much beta and are not finished products. If you want everything to work, continue to use 5.2.7.x versions. I also recommend only using portable versions of betas, especially the 5.3.8.x versions, so that one can keep their working stable version intact while testing the betas without affecting the data folder at Roaming\Maxthon5.

     

    I just want to inform about this problem. I can wait for stable Maxhon 5.3.8.x version.

    On 28.05.2019 at 6:21 AM, BugSir006 said:

    Hi there, could you let me know the specific extension name?

    Old Stylish extension has a background service. I attached the mxaddon file.

    Stylish.mxaddon

  2. Hi Mx Devs,

    You have probably added exceptions for some websites (youtube, twitter, facebook, maxthon etc.). My some extensions and user-scripts do not work anymore on them. You've blocked the script's injection or execution on some web pages. Is this your new policy or is it a unnoticed update?

    I will continue to stay in Maxthon v5.1.6.1000 version as long as these restrictions continue. If these restrictions are permanent, I will stop using Maxthon. Thanks.

  3. 21 hours ago, vladimer08 said:

    Is it possible to do this for twitch.tv?

    Hi @vladimer08 I wrote the following style for you. You can edit the scale value and aspect ratios what you need.

    @media screen and (device-aspect-ratio: 3440/1440) {
    	.player[data-isfullscreen="true"] video {
    		transform: scale(1.345) !important;
    		-moz-transform: scale(1.345) !important;
    		-ms-transform: scale(1.345) !important;
    		-webkit-transform: scale(1.345) !important;
    	}
    }
    
    @media screen and (device-aspect-ratio: 1920/1080) {
    	.player[data-isfullscreen="true"] video {
    		transform: scale(1.333) !important;
    		-moz-transform: scale(1.333) !important;
    		-ms-transform: scale(1.333) !important;
    		-webkit-transform: scale(1.333) !important;
    	}
    }
    
    @media screen and (device-aspect-ratio: 1024/768) {
    	.player[data-isfullscreen="true"] video {
    		transform: scale(1) !important;
    		-moz-transform: scale(1) !important;
    		-ms-transform: scale(1) !important;
    		-webkit-transform: scale(1) !important;
    	}
    }

    snap_screen_20180227194303.png

    • Like 1
  4. 11 hours ago, nTrophy said:

    Dude, you f*n rock! Thank you so much for your help!

    You're welcome, I'm glad I was able to help. Actually you don't need media query starts with "@media..", you can only use inner style code. If you want to use your style in different devices, then update it like below. You may need to adjust scale amounts for each resolution.

    @media screen and (device-aspect-ratio: 3440/1440) {
    	.html5-video-player.ytp-fullscreen video {
    		-webkit-transform: scale(1.345) !important;
    	}
    }
    
    @media screen and (device-aspect-ratio: 1920/1080) {
    	.html5-video-player.ytp-fullscreen video {
    		-webkit-transform: scale(1.333) !important;
    	}
    }
    
    @media screen and (device-aspect-ratio: 1024/768) {
    	.html5-video-player.ytp-fullscreen video {
    		-webkit-transform: scale(1) !important;
    	}
    }

     

    • Like 1
  5. Hi, @nTrophy

    You don't have to wait any extension for this feature. Install Stylish extension and then add the following style.

    @media screen and (device-aspect-ratio: 21/9) {
    	.html5-video-player.ytp-fullscreen video {
    		-webkit-transform: scaleX(1.33) !important;
    	}
    }

    Here is a screenshot how to do. Don't forget to add youtube's domain in "Rules" section.

    snap_screen_20170925080419.png

    • Like 2
  6. Some of UserScripts are not suitable to port for Maxthon addons. They sometimes request some dependencies or API calls (like GM_* stuffs). And they also have their update mechanism. Here is the reason why ViolentMonkey is the essential to do that. You cannot maintain this extension even If you get a help.

  7. Hello Maxthon, Some features of extension that I realized are not supported anymore in this core (Chrome 55). Do you think you are going to resolve them in the official release.

    - I cannot inspect the page script of extension in the "Content Scripts" section.
    - "mx.app.runtime.AppAction.activate()" does not work anymore. (Showing Panel from the page script). It was the most important thing that makes Maxthon a better Browser as compared to other chrome-based Browsers.

  8. You can only send or receive a message from one action (toolbar script) to another (page script) or vice versa. For example;

    Toolbar script:

    var mxRuntime = window.external.mxGetRuntime();
    
    function getMessageFromPage(obj) {
      console.log('message: ' + obj);
    }
    
    mxRuntime.listen('messageFromPage', getMessageFromPage);
    
    var button = document.getElementsByTagName("button")[0];
    button.onclick = function(e) {
      mxRuntime.post('messageFromToolbar', 'Hi from Toolbar!');
    }

    Page script:

    var mxRuntime = window.external.mxGetRuntime();
    
    function getMessageFromToolbar(obj) {
      console.log('message: ' + obj);
    }
    
    mxRuntime.listen('messageFromToolbar', getMessageFromToolbar);
    
    mxRuntime.post('messageFromPage', 'Hi from Page Script!');

     

    • Like 1
  9. In javascript environment, If your variable is not a boolean, every value of variable represents true except "0" string, undefined or null value. You must compare storage value to what you need.

    var mxRuntime = window.external.mxGetRuntime(),
        mxStorage = mxRuntime.storage,
        mxTabs = mxRuntime.create('mx.browser.tabs');
    
    var activate = mxStorage.getConfig('openTab') == 'true';
    mxTabs.newTab({
      url: url,
      activate: activate,
      position:"afterCurrrent"
    });

     

    • Like 1
  10. 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>

     

  11. You should create a background service in your extension in order to catch properly all of panel events.

    1- Define service file in your def.json
     

    [
    	{
    		.
    		.
    		"service": { main: "service.htm", debug: false }
    		.
    		.
    	}
    ]

    2- Catch events in service.htm.

    <!DOCTYPE HTML>
    <html lang="en-US">
    <head>
      <meta charset="UTF-8">
      <script>
        var rt = window.external.mxGetRuntime();
        rt.onAppEvent = function (obj) {
          switch (obj.type) {
            case "ACTION_START":
              // panel started.
              break;
            case "ACTION_STOP":
              // panel stopped.
              break;
            case "ACTION_SHOW":
              // panel is shown.
              break;
            case "ACTION_HIDE":
              // panel is hidden.
              break;
            case "ERROR":
              console.log(obj.errorMessage);
              break;
            case "LOCALE_CHANGED":
              // locale changed.
              break;
            default:
              // do nothing.
          }
        };
      </script>
    </head>
    <body>
    </body>
    </html>

    You can also debug your service by changing debug parameter.

    • Like 3
  12. On Tue Feb 02 2016 10:05:56 GMT+0200 (Turkey Standard, Toros37 said:

    Bayas son açıklamalar nedir bizde anlasak.

    Daha once uzantinin turkce ve ingilizce destegi vardi, buna ek olarak rusca, fransizca ve ispanyolca dilleri de eklendi. Ayrica daha once pasif hale getirdigim bir kac ozelligide aktiflestirdim. bundan sonra panel penceresi uzerindeki kapama ve pin ikonlarini da kullanabileceksiniz. eger paneli pencere uzerinde bulunan kapama ikonu ile kapatirsaniz, uzanti kendini durdurup calismayacak ta ki tekrar kenar cubugundan uzerine tiklanincaya kadar. bir de paneli artik kenarda sabitleyebileceksiniz pencere uzerindeki pin ikonunu kullanarak.

    • Like 1
  13. 1 hour ago, A.S. said:

    I have a few questions:

    1. Why do you use "false" for "allowPin""resizable" and "stopOnClose"? Because many users want to be able to pin / resize / close window. And if I want to only minimize window, I can just click anywhere beyond its borders. Just think about this.
    2. I know that extensions does not work with Russian, but I made ru-ru.ini:
      It looks stange... So I use / to add other terms what you can use. You should look on it.
    3. What about other languages?
      I know people, who can help you with German, Spanish and French.

    I appreciated for your response and contributing.

    I'm not such a master on css tricks. If you change size or pin the panel, some elements didn't seem correctly. Therefore, I had to add some restrictions for "resizable" and "allowPin" features. "stopOnClose" feature didn't work as I want, so I disabled it.

    My english so bad, I didn't introduce on forum extensions' page for new languages Spanish, French and German. I'm very pleased with your help.

    This extension has a github page. You can contribute or add an issue.

    https://github.com/abdllhbyrktr/TurkishDictionary

    • Like 1