JAVA SCRIPT at MX 5-1700


Chantao

Recommended Posts

10 hours ago, BugSir006 said:

Hi Chantao, could you tell us how it doesn't work? Do you mean your java script saved as a note in Infobox?

I confirm Chantao's observation for bookmarks have a Javascript as the URL.  An example is the Microsoft Translator Javascript or Wilser's variation of it in the Extensions Forum.  Here is the MS script:

javascript: (function() {    var s = document.createElement('script');    s.type = 'text/javascript';    s.src = 'http://labs.microsofttranslator.com/bookmarklet/default.aspx?f=js&to=';    document.body.insertBefore(s, document.body.firstChild);  var l = document.createElement('link');    l.setAttribute('rel', 'stylesheet');    l.setAttribute('type', 'all');    l.setAttribute('href', 'https://sites.google.com/site/fileshxz/home/m_t.css');    document.body.appendChild(l);})();

               <<SL>>

Link to comment
Share on other sites

  • 2 weeks later...
On 9/28/2016 at 2:10 AM, SnowLeopard said:

I confirm Chantao's observation for bookmarks have a Javascript as the URL.  An example is the Microsoft Translator Javascript or Wilser's variation of it in the Extensions Forum.  Here is the MS script:

javascript: (function() {    var s = document.createElement('script');    s.type = 'text/javascript';    s.src = 'http://labs.microsofttranslator.com/bookmarklet/default.aspx?f=js&to=';    document.body.insertBefore(s, document.body.firstChild);  var l = document.createElement('link');    l.setAttribute('rel', 'stylesheet');    l.setAttribute('type', 'all');    l.setAttribute('href', 'https://sites.google.com/site/fileshxz/home/m_t.css');    document.body.appendChild(l);})();

It seems that I encountered a similar issue as this, but it turns ok after I restarting my PC. How about restarting your PC and see?

Link to comment
Share on other sites

4 hours ago, BugSir006 said:

It seems that I encountered a similar issue as this, but it turns ok after I restarting my PC. How about restarting your PC and see?

No luck.  I had several restarts since my post and I've tried both the Microsoft javascript and Wilser's variation and neither do anything on the Chinese Forum.

OS is Win7 x64 Enterprise in case I didn't mention it.

                   <<SL>>

Link to comment
Share on other sites

20 hours ago, SnowLeopard said:

OS is Win7 x64 Enterprise in case I didn't mention it.

Thanks, dear! It seems that misunderstood Chantao's post, and I get to understand it know with your example and explanation, thanks very much. Will forward this java issue to our testers immediately! 

Link to comment
Share on other sites

On 9/28/2016 at 2:10 AM, SnowLeopard said:

javascript: (function() {    var s = document.createElement('script');    s.type = 'text/javascript';    s.src = 'http://labs.microsofttranslator.com/bookmarklet/default.aspx?f=js&to=';    document.body.insertBefore(s, document.body.firstChild);  var l = document.createElement('link');    l.setAttribute('rel', 'stylesheet');    l.setAttribute('type', 'all');    l.setAttribute('href', 'https://sites.google.com/site/fileshxz/home/m_t.css');    document.body.appendChild(l);})();

Hi SnowLeopard, according to our testers, this js works on neither Maxthon or other browsers. Could you make sure again the js is all correct? Or could you provide another one?

@Chantao Could you provide the specific js that doesn't work? So that I can forward it to our testers for further testing. Thank you in advance.

Link to comment
Share on other sites

58 minutes ago, BugSir006 said:

Hi SnowLeopard, according to our testers, this js works on neither Maxthon or other browsers. Could you make sure again the js is all correct? Or could you provide another one?

@Chantao Could you provide the specific js that doesn't work? So that I can forward it to our testers for further testing. Thank you in advance.

Sorry, I have three different translation scripts as bookmarklets of different sources.  The one I sent is direct from Microsoft a year or so ago.  Another is from a diffewrentt source but with claims to be from microsoft.  The third is from our own Wilser in the forum here.  I tried all three on the Chinese forum in Mx 4.4.8.2000 and found that only Wilser's worked in MX4.  I tried it in MX5.0.1.1700 and it doesn't although it was imported directly from MX4.  I compared the two instances lime by line letter by letter and they are identical.

The Wilser bookmarklrt script is:

javascript:(function(){var a=document.createElement('script');a.type='text/javascript';a.charset='utf-8';a.src='https://drive.google.com/uc?export=download&id=0B9sxnixlgUxHcnYwVVVBVEtSUWM';document.body.insertBefore(a,document.body.firstChild);})();

                      <<SL>>

Link to comment
Share on other sites

6 hours ago, Paul Corfield said:

This site says the Microsoft translator bookmarklet is no longer supported as of August 22nd 2016.

https://microsofttranslator.uservoice.com/knowledgebase/articles/1074523-service-for-labs-microsofttranslator-com-discontin

Aha, that's why I couldn't find it on the Microsoft Translate site today.  However Wilser's bookmarrklet does work in Mx 44.4.8.2000.  Only the two that were directly and indirectly from Microsoft fail to work.  But "no longer supported" doesn't mean te script should stop working as it had before 8/22/16.

Edit: I examined a copy of the Microsoft Translator Bookmarklet script and found why it doesn't work.  Microsoft killed all the scripts by removing their labs.microsoft.com website referenced in the script.  The other script is a modification of thr MS script but still references labs.microsoft.com which is no longer accessible.

Wilser's script posted above in this thrread references Google Drive instead of the MS dead site.  Si it works in MX 4.4.8 and 4.9.4.200 but not in MX5 .

                   <<SL>>

 

 

Link to comment
Share on other sites

hi everyone!

in versoin 5.01.1700 my js bookmarklet is not working also!

but in prev MX5 beta version it was ok!

javascript:(function(a,d,e){var c=function(){return ' function ' ===typeof a.srf7 &  & (a.srf7(e)||!0)},f=function(a){var b=a.createElement( ' script ' );b.id= ' rf7 ' ;b.src=d;b.addEventListener?b.addEventListener( ' load ' ,c,0):b.onreadystatechange=c;(a.getElementsByTagName( ' body ' )[0]||a.getElementsByTagName( ' head ' )[0]).appendChild(b)};c()||f(a.document)})(top.self||window, ' https://online.roboform.com/rfjs/main.js ' , ' 181590d56501597769c4934fffe651c2 ' );

Link to comment
Share on other sites

On 10/10/2016 at 3:40 PM, SnowLeopard said:

javascript:(function(){var a=document.createElement('script');a.type='text/javascript';a.charset='utf-8';a.src='https://drive.google.com/uc?export=download&id=0B9sxnixlgUxHcnYwVVVBVEtSUWM';document.body.insertBefore(a,document.body.firstChild);})();

 

On 10/10/2016 at 11:44 PM, EatMe3000 said:

javascript:(function(a,d,e){var c=function(){return ' function ' ===typeof a.srf7 &  & (a.srf7(e)||!0)},f=function(a){var b=a.createElement( ' script ' );b.id= ' rf7 ' ;b.src=d;b.addEventListener?b.addEventListener( ' load ' ,c,0):b.onreadystatechange=c;(a.getElementsByTagName( ' body ' )[0]||a.getElementsByTagName( ' head ' )[0]).appendChild(b)};c()||f(a.document)})(top.self||window, ' https://online.roboform.com/rfjs/main.js ' , ' 181590d56501597769c4934fffe651c2 ' );

Thank you both! I'll forward these two to our testers! Please be patient and wait for the result. :1f60b:

 

Dear all,

Our testers have tried these two, but both of them cannot be open?

So could any of you provide a short video about opening these two bookmarklets?

Our tester also found this one and want you to help test whether it works on your computers, since this one works on hers.

 

javascript:(function(){ document.location.href='C:\Users\ADMINI~1\AppData\Local\Temp\[5Uhttp://www.google.com/addurl?q='+escape(document.location.href) })();

 

Thank you all again for helping. @EatMe3000 @SnowLeopard @Chantao

Link to comment
Share on other sites

It was

Save as Google Bookmarks:

javascript:(function()%7Bvar%20a=window,b=document,c=encodeURIComponent,d=a.open(%22http://www.google.com/bookmarks/mark?op=edit & output=popup & bkmk=%22+c(b.location)+%22 & title=%22+c(b.title),%22bkmk_popup%22,%22left=%22+((a.screenX%7C%7Ca.screenLeft)+10)+%22,top=%22+((a.screenY%7C%7Ca.screenTop)+10)+%22,height=420px,width=550px,resizable=1,alwaysRaised=1%22);a.setTimeout(function()%7Bd.focus()%7D,300)%7D)();

first. Previously it opened link name and link. Today there is nothing at all, all fields free. But A.S. Has an extension built for it.

Shareholic

javascript:(function(){var%20service= ' all ' ;if(window.Shareaholic%20 &  & %20window.Shareaholic.prototype%20 &  & %20window.Shareaholic.prototype.Bookmarklet){Shareaholic.init_bookmarklet(service)}else{var%20shr=document.createElement( ' script ' );shr.type= ' text/javascript ' ;shr.async= ' true ' ;shr.src= ' //dtym7iokkjlif.cloudfront.net/assets/pub/shareaholic.js ' ;shr.onload=shr.onreadystatechange=function(){var%20rs=this.readyState;if(rs%20 &  & %20rs!= ' complete ' %20 &  & %20rs!= ' loaded ' ){return;}try{Shareaholic.init_bookmarklet(service)}catch(e){%20}};document.getElementsByTagName( ' head ' )[0].appendChild(shr);}})();void(0);

for example, does not work. Actually, all do not work, which I have, no translate, no share; But there are now enough extensions again for it.

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.