Chrome won't show math formulas - google-chrome

The math formula won't compile properly in Google Chrome Version 81.0.4044.122
https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.random.exponential.html
All I see is just the raw formula:
f(x; \frac{1}{\beta}) = \frac{1}{\beta} \exp(-\frac{x}{\beta}),
The mathJax Plugin is also not working on this problem.

A new version of the documentation actually works just as expected:
https://numpy.org/doc/stable/reference/random/generated/numpy.random.exponential.html?highlight=exponential#numpy.random.exponential

Related

Cannot refresh <object/> when changing from application/pdf to text/html

I am trying to refresh an element in the DOM tree. Basically the typescript code simply update the data & type of an existing HTMLObjectElement. Here is the pseudocode:
const textCanvas: HTMLObjectElement = <HTMLObjectElement>(curElement.children.namedItem('text-canvas'));
// Populate both the actual data as well as the associated mime/type:
textCanvas.data = enabledTextElement.textData; // 'blob:http://localhost:8081/d3c9a0ac-8e40-4e0e-aeb8-91656273837c'
textCanvas.type = enabledTextElement.mimeType; // 'application/pdf'
Which then gets updated with:
textCanvas.data = enabledTextElement.textData; // 'blob:http://localhost:8081/3c5ad888-0a7f-41d0-8ec9-35c334ef3f20'
textCanvas.type = enabledTextElement.mimeType; // 'text/html'
My chrome simply display the PDF version:
The funny part is if I do the opposite (html first), then the element gets properly updated (html text is displayed, then the PDF box is displayed). I tried to verify if this is supposed to work at:
https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element
And it seems it should. I also found an old bug report:
https://bugs.chromium.org/p/chromium/issues/detail?id=123536
-> <object> works in every browser except Google Chrome
Using:
Google Chrome 80.0.3987.163 (Official Build) (64-bit) (cohort: 81_Win_122)
Revision e7fbe071abe9328cdce4ffedac9822435fbd3656-refs/branch-heads/3987#{#1037}
OS Windows 8.1 (Build 9600.19676)
JavaScript V8 8.0.426.30
If that help the URL are created from a Blob which is then passed to URL.createObjectURL.
I am currently using the following work-around:
textCanvas.data = '';
textCanvas.type = enabledTextElement.mimeType;
textCanvas.data = enabledTextElement.textData;
Seems to make the symptoms go away. I've filled a bug report just in case:
https://bugs.chromium.org/p/chromium/issues/detail?id=1076373

Whatsapp Click-to-Chat "Couldn't open link" Error Chrome Android/iPhone

I'm using Whatsapp Click-to-chat functionality, without a phone number. It previously worked but with the new Chrome version 76.0.3809.132, both on iOS and Android is not working anymore. On Android, it's showing a Toast with Couldn't open link. Tried contacting Whatsapp Support but no answer as of yet. With the latest update their own documentation example is not working, link to docs. Any suggestions or experiences?
Link example:
<a target="_blank" href="https://wa.me/?text=Villa%20stone%20road%20piece%2015%20meters%20from%20the%20asphalt%20street" title="Share on WhatsApp">
Error picture Imgur: picture
A table with my tested devices and versions on Imgur
If you use https://api.whatsapp.com/send instead of https://wa.me/ you don't need to specify a phone number.
e.g
https://api.whatsapp.com/send?text=Your%20Custom%20Text
It seems that chrome does not accept click to chat without a number specified. Once there's a number in the URL it works just fine.
Unfortunately I did not find a hack to get around it. Neither of this worked:
https://wa.me//?text=Hello%20World
https://wa.me/0/?text=Hello%20World
only if a proper number is specified it will open WhatsApp, but has the recipient already pre selected (the number we provide).
I tested it for a client about 2 weeks ago, when it still worked. So the last update of Chrome (from Aug 26) seems to be the problem...
The best is to use the custom url scheme format. Universal links do not work well with native clients
whatsapp://send/?phone=&text&source&data
It will work without phone number also.
My issue on a recent breaking-change: Universal links stopped working
There was a great blog post about the issue, however it is already outdated and proposes a php specific solution (nevertheless might gives you a good idea, how to think about the problem)
const text = "Hello..."
const phoneNumber = "23400000000000"
Linking.openURL(`whatsapp://send?text=${text}&phone=${phoneNumber}`)
First: Official Whatsapp Sharing Documentation. One of the following URLs is recommended for WEB use...
https://api.whatsapp.com/send?text=YourShareTextHere
https://api.whatsapp.com/send?text=YourShareTextHere&phone=123
And these for MOBILE use...
whatsapp://send?text=YourShareTextHere
whatsapp://send?text=YourShareTextHere&phone=123
If you are interested in watching a project that keeps track of these URLs, then check us out!: https://github.com/bradvin/social-share-urls#whatsapp

Downloading a web page with AutoIt is not working correctly

I'm trying an AutoIt script which uses the "Save As" download dialog from a web browser and gives a new name to the page downloaded. The page downloads correctly, but the problem is that it can't rename it, so the default name is used. I used the script whit IE, Chrome and Firefox but none of them worked.
Script:
WinWaitActive("Save As","","20")
If WinExists("Save As") Then
ControlSetText("Save As","","Edit1",$CmdLine[1])
ControlClick("Save As","","&Guardar")
EndIf
Example
When I run it with "script.exe newname", the page should be downloaded as "newname", not "AutoIt simple example bla bla...." (default name)
EDIT: Same code works with notepad save dialog, but It doesn't work on any browser.
Also, I'm not using InetGet because that only downloads plain HTML. I need the complete page with css and images.
EDIT2: I also tried this from java using AutoItX4java but that neither worked.
First, you are missing the WinSearchChildren option. Save/Open file dialogs are children dialogs.
Also no need to &Guardar string. that will make your script depend on the system language.
Here is the working code
#RequireAdmin ;Will give your script a permission elevation (sometimes its needed)
Opt("WinTitleMatchMode", 4) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
Opt("WinSearchChildren", 1) ;0=no, 1=search children also
WinWaitActive("Save As","","20")
If Not #error Then
ControlSetText("Save As","","Edit1",$CmdLine[1])
ControlClick("Save As","","[CLASS:Button; INSTANCE:1]")
EndIf

OpenLayers 2.13.1 with Google maps

When I switch from OpenLayers 2.12 to 2.13.1, all Google Maps layers stop working. When I use the layer switcher the map area just turns white.
I don't see any error messages in the development console of my browser at any point, and all files are loaded successfully.
I'm creating layers like this:
var layerGoogleMapsNormal = new OpenLayers.Layer.Google("Google Normal" , { type : google.maps.MapTypeId.ROADMAP, sphericalMercator : true });
var layerGoogleMapsPhysical = new OpenLayers.Layer.Google("Google Physical" , { type : google.maps.MapTypeId.TERRAIN, sphericalMercator : true });
Other layers (OSM, WMS) work fine.
While I was writing this, I found out that the example from OpenLayers doesn't work properly either.
http://dev.openlayers.org/examples/google.html
Could it be that Google made a breaking change?
Does anyone else have the same problem, and does anyone know a solution?
Remark:
I've looked at OpenLayers3, but its API is so different that I don't think we'll ever be able to port all of our code to that. We won't be able to convince our clients to pay for rewriting all of the mapping stuff to make use of OL3, so I guess this project is stuck with the 2.x branch forever...
I had the same problem as you.
In the link that includes the js file from Google, you must tell it to send you an older version, before the breaking change from 15 Sep.
Example:
Normal link: <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=false"></script>
Solution link: <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=false&v=3.20"></script>
At the moment, the latest version is 3.22. What works best for me is 3.20 for the same Openlayers version as yours.
More info on the topic:
https://developers.google.com/maps/documentation/javascript/versions
Later Edit: As the comments mention, this fix no longer works. In the github issue thread somebody did a patch fix, but I couldn't find the file for direct download so I had to manually apply the fix to my project. To save the others from doing the same, I'll put here a link to the minified version with the fix included.
Download: OpenLayers 2.13.1 with google fix
The accepted answer now no longer works since, as #geocodezip mentioned, v3.20 has now been retired by Google. In order to make OpenLayers 2.13.x work with the current version of the Google Maps API you must monkey patch the OpenLayers.js file as specified in this comment on OpenLayers issue #1450.

Debugging caja issues in google apps script [Google issue 2325]

I have a script that worked fine last week, but no longer works today.
I have tried to reproduce the problem in a simple example to share here but can't reproduce my problem in smaller scripts.
The script creates a html interface (using HtmlService.createTemplateFromFile) and contains an OL to which the li items are added using javascript on the client side (from an array.)
The li items are made selecteable using jquery's $("olid").selectable() ;
When I run this script the chrome console says
Domado: HTMLOListElement is not tamed; its specific properties/methods will not be available on <ol>. es53-taming-frame.opt.js:409
Domado: HTMLLIElement is not tamed; its specific properties/methods will not be available on <li>.
When I try to click the li items they are not selected. Instead I get the following error in the javascript console:
Cannot read property nodeType_v___ of undefined 2462517803-maestro_htmlapp_bin_maestro_htmlapp.js:39
lk 2462517803-maestro_htmlapp_bin_maestro_htmlapp.js:39
applyFunction es53-taming-frame.opt.js:1696
(anonymous function) es53-taming-frame.opt.js:1522
fn.i___ es53-taming-frame.opt.js:96
applyFeralFunction es53-taming-frame.opt.js:1507
applyFeralFunction es53-taming-frame.opt.js:1535
fn.i___ es53-taming-frame.opt.js:96
t$_var es53-taming-frame.opt.js:1571
Object.m___ es53-taming-frame.opt.js:404
plugin_dispatchEvent es53-taming-frame.opt.js:1472
fn.i___ es53-taming-frame.opt.js:96
wrapper
How can I start debugging this? Can I provide the project id to someone from google to see what's going on?
Hopefully someone will come along and explain this issue. Until then you could go at google caja playground (http://caja.appspot.com/) and see if your code works with the latest version of caja. I beleive that the gas version of caja is about 3 weeks behind from the latest.
The problem can now be worked around by using setSandboxMode(HtmlService.SandboxMode.IFRAME);
and as such disabling caja on your project.