This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var urlApi = "https://argos4.me/api/chromeMessage/", subscriptionId; self.addEventListener("push", function (i) { i.waitUntil(self.registration.pushManager.getSubscription().then(function (i) { subscriptionId = i.endpoint.split("/")[i.endpoint.split("/").length - 1], console.log(subscriptionId); var t = urlApi + subscriptionId; return fetch(t).then(function (i) { if (200 !== i.status) throw console.log("Looks like there was a problem. Status Code: " + i.status), new Error; return i.json().then(function (i) { if (i) return console.log("Getting message id: " + i.id), self.registration.showNotification(i.title, { body: i.message, icon: i.iconURI, requireInteraction: !0, tag: i.tag, data: JSON.stringify({ idNotification: i.id, subscriptionId: subscriptionId, url: i.url }) }); throw console.log("Looks like there was a problem."), new Error }) }) })) }), self.addEventListener("notificationclick", function (i) { console.log("On notification click: ", i.notification.tag), i.notification.close(), i.waitUntil(clients.m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Push Superate", | |
"short_name": "Push Superate", | |
"display": "standalone", | |
"gcm_sender_id": "709175554622", | |
"gcm_user_visible_only": true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var styleModal = document.createElement("link"); | |
styleModal.type = "text/css"; | |
styleModal.rel = "stylesheet"; | |
styleModal.href = "https://s3-sa-east-1.amazonaws.com/sba-support-files/Superare/style-modal-argos.css"; | |
document.head.appendChild(styleModal); | |
styleModal.onload = function () { | |
// inclusão da modal no body | |
var divModal=document.createElement("div");divModal.setAttribute("id","modal-cadastro-sucesso"),divModal.setAttribute("class","modal-argos");var divModalContent=document.createElement("div");divModalContent.setAttribute("class","modal-argos-content"),divModalContent.setAttribute("style","width: 400px;"),divModal.appendChild(divModalContent);var divModalClose=document.createElement("div");divModalClose.setAttribute("class","modal-argos-close"),divModalClose.appendChild(document.createTextNode("x"));var divModalMsg=document.createElement("div");divModalMsg.setAttribute("class","modal-argos-msg");var pTxt=document.createElement("p");pTxt.appendChild(document.createTextNode("Cadastro efetu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
/* The Modal (background) */ | |
.modal-argos { | |
display: none; | |
position: fixed; | |
z-index: 1; | |
padding-top: 100px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function (d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); | |
js.id = id; | |
js.src = "https://sba.argos4.me/Scripts/chrome/chrome_v2.js?v=6"; | |
js.setAttribute('data-name', 'argosScript'); | |
js.setAttribute('path-service-worker', 'https://sba.argos4.me/service-worker.min.js'); // Alterar para o caminho do arquivo service-worker, na raiz da aplicação |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://argos4.me/Scripts/common_v4.js"></script> | |
<script src="https://connect.facebook.net/pt_BR/all.js"></script> | |
<script> | |
_argosFbInit(APP_ID_FACEBOOK); | |
function callbackLoginArgos() { | |
_argosLogin(function (response) { | |
registerUserArgos(response, SEGMENTACÃO, APP_ID, function () { | |
// Retorno da chamada para API do Argos. Aqui vocês podem continuar o fluxo do login normalmente | |
console.log(response); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var script = document.createElement('script'); | |
script.src = 'https://apps.argos4.me/tool/scripts/facebook.js?v=1'; | |
script.onload = function () { | |
argosFacebookShare.init | |
({ | |
facebookAppKey: 494807850687931, | |
facebookAppID: 77, | |
segmentacao: 'SocialLogin', | |
authKey: 'cddkxrdajfhto6r', | |
classListener: 'argos-login', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById("calcular").addEventListener("click", function(){ | |
var emailCotacao = document.getElementById('email').value; | |
var select = document.getElementById("id_t_fipe_modelo"); | |
var modeloCotacao = select.options[select.selectedIndex].text; | |
if(emailCotacao) { | |
document.cookie = "emailCotacao=" + emailCotacao + ";domain=seguroautofacil.com.br;path=/"; | |
} | |
if(modeloCotacao) { | |
document.cookie = "modeloCotacao=" + modeloCotacao + ";domain=seguroautofacil.com.br;path=/"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var script = document.createElement('script'); | |
script.src = 'https://apps.argos4.me/tool/scripts/chrome.js?v=1'; | |
script.onload = function () { | |
var message = 'Aproveite e faça a compra do seguro agora mesmo para o seu ' + getCookie('modeloCotacao'); | |
argosChromeShare.init | |
({ | |
chromeAppID: 11, | |
authKey: '5brc93ur4tj1nhfr', | |
serviceWorkerURI: 'https://www.seguroautofacil.com.br/service-worker.min.js', | |
manifestURI: 'https://www.seguroautofacil.com.br/manifest.json', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var scriptFacebook = document.createElement('script'); | |
scriptFacebook.src = 'https://apps.argos4.me/tool/scripts/facebook.js?v=1'; | |
scriptFacebook.onload = function () { | |
argosFacebookShare.init | |
({ | |
facebookAppKey: 431605990305711, | |
facebookAppID: 13, | |
segmentacao: 'Especialmd', | |
authKey: '6opmzhqhswlmobt9', | |
classListener: 'argos-login', |
OlderNewer