PageSourceSearch

https://dramaresource.com/wp-content/plugins/aweber-web-form-widget/src/js/aweber-wpn-script.js?ver=v7.3.35

js dramaresource.com collected 2026-10-01 12:32:46 UTC 1,488 bytes, 42 lines download raw bytes

1function registerServiceWorker(aweber_worker) {
2	navigator.serviceWorker.register(aweber_worker, {scope: "/"}).then(function(registration) {
3		console.log('AWeber ServiceWorker registration successful with scope: ', registration.scope);
4	}, function(err) {
5		console.log('AWeber ServiceWorker registration failed: ', err);
6	});
7}
8
9function unregisterServiceWorker(aweber_worker) {
10	navigator.serviceWorker.getRegistrations().then(function(registrations){
11		for (let worker in registrations) {
12			if (registrations[worker].active.scriptURL == aweber_worker) {
13				console.log('Found AWeber Service Worker. ' + aweber_worker);
14				registrations[worker].unregister().then(function(status){
15					if (status) {
16						console.log('AWeber Service Worker unregister successfully!.');
17					} else {
18						console.log('Failed to unregister the AWeber Service Worker');
19					}
20				});
21			}
22		}
23	});
24}
25
26function updateServiceWorker() {
27	if ('serviceWorker' in navigator) {
28		let aweber_worker = aweber_wpn_vars.plugin_base_path + 'sdk/aweber-service-worker.js.php';
29		if (aweber_wpn_vars.register_aweber_service_worker == 1) {
30			// Lets do regsiter and unregsiter the WPN here.
31			registerServiceWorker(aweber_worker);
32		} else {
33			// Unregister the AWeber Service Worker.
34			unregisterServiceWorker(aweber_worker);
35		}
36	} else {
37		console.log('Service Worker not found in the navigator!. Failed to register AWeber Service Worker');
38	}
39}
40
41// Update the aweber service worker.
42updateServiceWorker();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.