Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: elements/viewer-page-indicator/viewer-page-indicator.html

Issue 213223004: Make all the polymer elements CSP compliant. (Closed) Base URL: https://chromium.googlesource.com/chromium/html-office-public.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: elements/viewer-page-indicator/viewer-page-indicator.html
diff --git a/elements/viewer-page-indicator/viewer-page-indicator.html b/elements/viewer-page-indicator/viewer-page-indicator.html
index fb247a2f0890f283f13db6c168653c40559c9427..aa6618fc86687d8bd88c677f250a749848095eca 100644
--- a/elements/viewer-page-indicator/viewer-page-indicator.html
+++ b/elements/viewer-page-indicator/viewer-page-indicator.html
@@ -4,33 +4,5 @@
<div id="text">{{text}}</div>
<div id="triangle-right"></div>
</template>
-<script>
- Polymer('viewer-page-indicator', {
- text: '1',
- timerId: undefined,
- ready: function() {
- var callback = this.fadeIn.bind(this, 2000);
- window.addEventListener('scroll', function() {
- requestAnimationFrame(callback);
- });
- },
- initialFadeIn: function() {
- this.fadeIn(6000);
- },
- fadeIn: function(displayTime) {
- var percent = window.scrollY /
- (document.body.scrollHeight -
- document.documentElement.clientHeight);
- this.style.top = percent *
- (document.documentElement.clientHeight - this.offsetHeight) + 'px';
- this.style.opacity = 1;
- clearTimeout(this.timerId);
-
- this.timerId = setTimeout(function() {
- this.style.opacity = 0;
- this.timerId = undefined;
- }.bind(this), displayTime);
- }
- });
-</script>
+<script src="viewer-page-indicator.js"></script>
</polymer-element>
« no previous file with comments | « elements/viewer-error-screen/viewer-error-screen.js ('k') | elements/viewer-page-indicator/viewer-page-indicator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698