Export notes on website to Google drive - google-drive-api

I am trying to get all the notes on my website to get exported onto Google drive. I have a pop up window with a "Save to drive" button but I can't figure out what file this HTML needs to be converted to. Also not sure how to convert the HTML into the certain file that Google drive needs.

Based from this documentation, the button is configured with a few attributes in a div tag in the HTML markup. You need to include the necessary JavaScript resource below to add the Save to Drive button:
<!DOCTYPE html>
<html>
<head>
<title>Save to Drive Demo: Basic Page</title>
<link rel="canonical" href="http://www.example.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
<div class="g-savetodrive"
data-src="//example.com/path/to/myfile.pdf"
data-filename="My Statement.pdf"
data-sitename="My Company Name">
</div>
</body>
</html>
Check the examples here.

Related

How to add a button which prints a pdf document on my webpage?

I want to add a button to my website which will allow the user to print an attached PDF document, which is stored locally on the website server.
How can i do this?
You can this scenario from print.js.
That's very simple.
Please check here this page and download materials and later follow my code.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/print.min.js"></script>
<link rel="stylesheet" href="/print.min.css" type="text/javascript"/>
<title>TEST PRINT</title>
</head>
<body>
<button type="button" onclick="print my pdf directly ('media/arg.pdf')">
Print PDF
</button>
</body>
</html>
You cannot manage to print a PDF file just like that. This is an action that the user has to perform when opening the PDF file.
Once the PDF file is opened you also cannot force print.
The only suggestion I would give you here is just to add a link to that PDF and the link text could be something like:
Click to open PDF and print it

HTML redirect link

Can anyone tell me how an HTML page will be created with 5 website names like Google, Yahoo etc. and when we click on the specified link like Google we need to redirect to Google home page?
<html>
<head>
<title>Sample Webpage with links</title>
</head>
<body>
Google<br/>
Yahoo<br/>
Facebook<br/>
StackOverflow<br/>
</body>
</html>

Google Maps Application doesn't start anymore

My map worked fine until recently. The HTML is using a javascript and css file loaded from Google Drive to display. It seems that this is the problem, because when I load these files directly from the computer, it works. Here is the HTML code:
<!DOCTYPE html>
<html>
<head>
<title>Atlas</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" href="http://googledrive.com/host/0B55_4P6vMjhITEU4Ym9iVG8yZUU/style.css" rel="stylesheet" media="all" />
<script src="https://www.google.com/jsapi"></script>
<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBkcSHRlpwYgUpLlFXSC4hC73QCCcKNh2Q&sensor=false&libraries=geometry&language=ro"></script>
<script src="http://googledrive.com/host/0B55_4P6vMjhITEU4Ym9iVG8yZUU/harta.js"></script>
</head>
<body>
<div id="map"></div>
<div id="elevation_chart"></div>
<div id="legenda"></div>
</body>
There was a universal problem with public-hosted html files hosted on Google Drive on 9/17. They were aware of the problem and as of today have fixed the issue.
If your map still doesn't work, try uploading your index.html file to the Drive, delete the old one, and refresh. That worked for me this morning.
See this thread from Google Groups on the issue.
Also, as of Monday, Google has reported several issues with Drive on it's Apps Status Dashboard.

Google pagespeed insights CSS warnings

I read many articles about optimization and after many efforts I minified all my CSS files and gathered all of them in one file. When I check again with PageSpeed Insights I still get low points and google still suggests me to remove the only left CSS file. here is the link of my site . Simply I have only this minified CSS in the head section.
<html lang="tr">
<head>
<meta charset="UTF-8">
<title>| sirtcantalilar.com </title>
<link href="/assets2/css/bootstrap.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
</body>
</html>
How can I optimize delivery of my website ?
The only solution that I know is to minify the CSS file and include it inline in the head tag of your html file
<head>
<style>
..minified CSS here
</style>
</head>
Make sure you are not using too much background images.And the CDN you are using is loading your site very slow.And also that twitter widget you are using is causing your page to load slow.Remove twitter widget to test if your site loads fast enough or not.

Why I can't develop single html page with linked css or js files?

What is wrong with Chrome? I want to develop just a single html page. Without any server. Just one page. I know that I need web-server for using that page. But I need to just create a short simple html page with linked js and css files. And I can't do this, because chrome is too smart and I get the same error from chrome:
Not allowed to load local resource
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>ACAB</title>
<script type='text/javascript' src="./data_statistic.js"></script>
....