PageSourceSearch

https://app.nefiks.si/angular/scripts/factory/NotificationFact.js?v=20201107

js nefiks.si collected 2026-10-01 13:06:29 UTC 1,334 bytes, 43 lines download raw bytes

1angular.module('nefiksApp')
2	.factory('NotificationFactory', function ($http, $websocket, $rootScope) {
3		var NotificationFactory = function() {
4			
5			var wsNotif;
6			
7			this.getLastNotifications = function(lastData) {	
8				var url = '/api/notification/m/last';
9				if(!!lastData) {
10					url += '/lid/' + lastData.lid;
11					url += '/llt/' + lastData.llt;
12					url += '/lnm/' + lastData.lnm;
13				}
14				
15				return $http.get(url);
16			};
17			
18			this.initNotifications = function(userid){
19                wsNotif = $websocket("wss://" + document.location.host + "/api/notifications/m/sockets/id/" + userid);
20
21                wsNotif.onMessage(function (event) {
22                    console.log('notification: ', event.data);
23                    //Logic for adding messages to messageboard
24                    $rootScope.$broadcast('newNotifications', event.data);
25                })
26
27                wsNotif.onError(function (event) {
28                    console.log('connection Error', event);
29                });
30                wsNotif.onClose(function (event) {
31                    console.log('connection closed', event);
32                });
33                wsNotif.onOpen(function () {
34                    console.log('connection open');
35                });     
36
37            }
38
39			
40		};
41	
42		return new NotificationFactory();
43	});

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.