Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.DzpCalculator = {};
- window.DzpCalculator.withControlsShadow = true;
- window.DzpCalculatorWide = {};
- var script = document.createElement('script');
- script.setAttribute('async', true);
- function createCalc() {
- if (window.innerWidth < 960) {
- script.setAttribute('src', 'https://dozarplati.com/js/calculatorWidget.js?ver=3');
- window.DzpCalculator.onload = function () {
- window.DzpCalculator.render("single-calc");
- }
- } else {
- script.setAttribute('src', 'https://my.dozarplati.com/widgets/calculator.js?ver=3');
- window.DzpCalculatorWide.onload = function () {
- window.DzpCalculatorWide.render("single-calc");
- }
- var calculatorStyles = document.createElement('link');
- calculatorStyles.rel = 'stylesheet';
- calculatorStyles.type = 'text/css';
- calculatorStyles.href = '//my.dozarplati.com/css/calculatorWidget.css';
- document.head.appendChild(calculatorStyles);
- }
- };
- createCalc();
- document.body.appendChild(script);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement