How do I find the default properties to set on JQuery Mobile? - jquery-mobile

Looking at the jqm repository, they have a tool called https://github.com/jquery/jquery-mobile/blob/master/tools/config-props.html config-props.
However, downloading the repo, and running it on my local machine ends up with the following error:
Uncaught SyntaxError: Unexpected token < file:///C:/Users/Ryan/Downloads/jquery-mobile-1.3-stable/jquery-mobile-1.3-stable/js/:1
From config-props.html
<script src="../external/jquery/jquery.js"></script>
<script src="../js/"></script>
The issue is that chrome is treating the /js/ directory as a html index page listing the contents of the folder, instead of including all the javascript files within into the page.
Is this a problem with chrome? Does the tool have errors? or is there some sort of preprocessing that needs to be performed first?

You can view this page online on their documentation.
It isn't very well published, but some url tweaking / exploring after following a broken link led to this
http://jquerymobile.com/resources/#Tools
Broken link on page: http://jquerymobile.com/test/tools/log-page-events.html
Which looks similar to https://github.com/jquery/jquery-mobile/blob/e377564aa121d0439a21bc97f7854ee618c3f72d/tools/log-page-events.html
redirected to
http://view.jquerymobile.com/master/demos/
Which looked suspiciously like a hosted version of the github repo.
changing to
http://view.jquerymobile.com/1.3-stable/tools/ resulted in an index page that led to
http://view.jquerymobile.com/1.3-stable/tools/config-props.html

Related

Markdown + LaTeX + Jekyll (Github Pages) = HTML?

I'm trying to use Github pages to both host my source files (strictly markdown with LaTeX equations) and manage the equation rendering when hosting the actual webpage. If I understand this process correctly, github uses Jekyll to statically generate the website, I guess converting all my .md into .html, so I don't have to.
I've read so many posts at this point indicating that I just have to include some lines in my html to run some javascript to use MathJax. I don't know javascript or html so most of the answers seem unclear to me.
Does anyone have a I need a barebones index.md hosted on github.io that renders MathJax.
I've tried:
Creating files in layouts/default.html
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax#3/es5/tex-mml-chtml.js"></script>
In _config.yml:
usemathjax : true in _config.yml, an
In the __*.md__itself (YAML Front matter):
---
usemathjax : true
---
My website is here with this page showing an html rendered from the markdown automatically via github, the other pages I generated the html locally in VS Code which doesn't scale properly on mobile and not what I want if github can just manage it directly. The source code is here for my repo.

rails 4.2.6 upgrade-insecure-requests CSP meta how to put in the head?

I have a Rails 4.2.6 application running. In some of my pages, I use iframe to put Google Map Embedded api to show maps of some locations. My whole website is https secured using letsencrypt. However the pages that use google map api always get a "Not Secure" warning from Chrome or Firefox. When I remove the google map iframes, the warning disappears.
I have googled a lot and there is a workaround in here using meta tag. The workaround is an HTML format, but I still don't know how to put the meta tag to my rails application. The keyword seems to be "upgrade-insecure-requests".
Please help, thank you .
Solved!
just put this line
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
in your main html file.
In my case, it is not application.html.erb, it's another file. After I put that line in my home page file, everything is working just fine now.

Error loading external URL in Phonegap 2.5

I created a new Phonegap 2.5 project from scratch, and I've been trying to load an external URL in it, but I keep getting input boxes popping up on startup before loading the actual URL. I first get a pop-up with the URL of the website, then in the input box it says "DeviceInfo","Device652321624". If I click Cancel, it pops up 2 more times before loading the website. On the website itself, it loads some relative URLs, but others cause the entire page to refresh and the input boxes to pop up again.
I set the URL by setting <content src="http://phonegap.example.com" />, which is just a regular website with Javascript. I even tried commenting out all Phonegap specific code (no more ondeviceready calls), but it still causes the problem. http://www.google.com loads for me, so I'm not sure what else to check. And it works with the Android version that I've developed.
If it helps, I've also seen this message in the XCode log: Resetting plugins due to page load.
I've had the exact same problem today.
I fixed it by checking the include of the cordova.js file (this js is generated when you create the project using the create command.
( called cordova.js in the renamed cordova project version. probably phonegap.js in phonegap ?)
anyway my include was :
<script type="text/javascript" src="js/cordova.js"></script>
whereas je js file was in the project root :
I changed it to
<script type="text/javascript" src="cordova.js"></script>
and every things is fine now.
also, the 'create' command for Android generate a different js file. make sur that the new one generated for ios is used.
hope that helps !
Problem is you are using android's cordova.js instead of ios's cordova.js.
Just make sure you are using the proper one.

Google Site Map error in Umbraco

I've installed google site map on my Umbraco (I installed it in 4.9, 4.8 and 4.7). I followed steps in [this site][1] http://our.umbraco.org/projects/website-utilities/google-sitemap-for-umbraco-4-%28jespercom%29 . But when I browse mydomain.com/GoogleSiteTree.aspx I get this error
This page contains the following errors:
error on line 2 at column 1: Document is empty
Below is a rendering of the page up to the first error.
I am unable to find the reason. Anyone knows the answer please help.
Can you open your masterpage and-or XSLT and make sure there is no whitespace at the top of the file?
You may need to bump up the macro in the masterpage that renders the macro, like so:
<%# Master ... %><asp:Content ContentPlaceHolderID="MyPlaceHolder" runat="server"><umbraco:Macro Alias="GoogleSitemap" runat="server" /></asp:ContentPlaceHolder>
This might fix your problem as I've seen similar issues when rendering XML or RSS feeds direct from a macro out to the HTTP response.

Firebug lite on iPad

Already found this page with some helpful hints.
Problem is I need to debug a web application on a CMS using an iPad and Safari.
So far I haven't been able to make firebug-lite work. I am working in a secured environment having no internet acces, but can copy files using a USB-key.
I have copied firebug-lite.js to the local server and included the file in a script tag in the head:
<script type="text/javascript" src="http://my_server/js/firebug-lite.js"></script>
Unfortunatly when I open the page in the CMS I cannot see the firebug-lite-button on the page. Verifying the source code firebug-lite should have been loaded on the page. There is no way to get a right click menu to inspect anything.
What can I do to make firebug-lite work on the iPad? What am I doing wrong?
Start Firebug Lite already opened, as per http://getfirebug.com/firebuglite#Options :
<script type="text/javascript" src="proto://path/to/firebug-lite.js#startOpened=true"></script>
I think you won't be able to inspect elements, but you can navigate to the elements in the DOM tree provided by Firebug Lite.
It looks like Firebug-lite has problems with the iPad browser since late 2010.
The problem (ticket on official tracker) has not been yet solved.
Have you tested the problematic page in Safari/Chrome/Chromium for desktop? Since they use Webkit, the same system used with mobile Safari/Chrome, you may be able to duplicate the error and find its solution. You can open Chrome's debugger with right click, Inspect element.

Resources