[Script] WME ChatJumper

Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Moderator: Unholy

Forum rules
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Re: [Script] WME ChatJumper

Postby bz2012 » Fri Jun 13, 2014 3:47 pm

I found a work around for the latest chrome dictate:
https://productforums.google.com/forum/?utm_campaign=2811969_hl_en_a_g&utm_source=0&utm_medium=1#!searchin/chrome/Chrome$20Extension/chrome/9NlMAr6uEVc/ambkrcKpi1cJ

I found a relatively easy method for working around this issue for Windows users. Although Chrome blocks the extension, they will still allow it if you're on a corporate network, which you can mimic on a Windows 7 computer even if you're not a part of a domain. Just follow these easy steps:

1) download Chrome group policy templates here: http://dl.google.com/dl/edgedl/chrome/p ... plates.zip
2) Copy [zip]\windows\chrome.admx to c:\windows\policydefinitions
3) Copy [zip]\windows\[yourlanguage]\chrome.adml to c:\windows\policydefinitions[yourlanguage]\chrome.adml
4) In Chrome, go to Settings -> Extensions
5) Check the Developer Mode checkbox at the top
6) Scroll down the list of disabled extensions and note the ID's of the extensions you want to enable. LogMeIn, for example, is ID: nmgnihglilniboicepgjclfiageofdfj
7) Click Start -> Run, and type gpedit.msc
8) Expand User Configuration -> Administrative Templates -> Google -> Google Chrome -> Extensions
9) Double-click to open "Configure extension installation whitelist"
10) Select "Enabled", then click "Show..."
11) In the list, enter all the ID's for the extensions you noted in Step 6
12) Click OK and restart Chrome.

All will be right with the world again, and you can have a drink and relish knowing that Google hasn't gotten the best of you yet. ;)



It allowed me to enable WME ChatJumper.
State Manager, Louisiana
bz2012
Map Raider
Map Raider
 
Posts: 1245
Joined: Wed Nov 23, 2011 4:32 pm
Location: Baton Rouge, La
Has thanked: 510 times
Been thanked: 205 times

Re: [Script] WME ChatJumper

Postby bz2012 » Wed Aug 20, 2014 6:44 pm

Taco909 wrote:Can someone patch the forum software so we can thank tkr85 more than once?


I think you can 'thank' him once, each time he posts to the forum. So, he just needs to post more often. :)
State Manager, Louisiana
bz2012
Map Raider
Map Raider
 
Posts: 1245
Joined: Wed Nov 23, 2011 4:32 pm
Location: Baton Rouge, La
Has thanked: 510 times
Been thanked: 205 times

Re: [Script] WME ChatJumper

Postby contrerasf5 » Sun Aug 24, 2014 5:01 pm

james890526 wrote:Seems like the link to this Chat Jumper is down :cry:

yeap tried to install it and the web site is suspended
contrerasf5
Area Manager
Area Manager
 
Posts: 35
Joined: Thu Sep 20, 2012 7:04 pm
Location: Culiacan
Has thanked: 5 times
Been thanked: 2 times

Re: [Script] WME ChatJumper

Postby contrerasf5 » Fri Sep 12, 2014 5:51 am

james890526 wrote:Looks like link is working now. I managed to download and install the script a few minutes ago


mee too!!
working on Opera with Tampermonkey
contrerasf5
Area Manager
Area Manager
 
Posts: 35
Joined: Thu Sep 20, 2012 7:04 pm
Location: Culiacan
Has thanked: 5 times
Been thanked: 2 times

Re: [Script] WME ChatJumper

Postby Dr_Deko » Wed Mar 12, 2014 8:18 pm

great job man! congratz!
Image Image
André Piacentini
AM: Noroeste do Estado de SP & Triângulo Mineiro - MG
LINKS ÚTEIS:Pontuação Guia de Edição Ranking
Keep Driving... And Keep Editing! ;)
Gostou da informação? dê um Image ali em cima!!!
Dr_Deko
 
Posts: 84
Joined: Sun Dec 22, 2013 9:01 am
Has thanked: 48 times
Been thanked: 32 times

Re: [Script] WME ChatJumper

Postby Fredo-p » Sun Jun 15, 2014 6:23 am

Someone make sure this gets added to the Add-on's Wiki page.
Image
ImageImageImageImageImageImage
WME βeta Tester
Waze Map Editor | Arizona Wiki | Waze Arizona G+
VZ Droid 4 |Waze v3.9.3.0
Fredo-p
Wiki Master
Wiki Master
 
Posts: 1207
Joined: Mon Aug 05, 2013 4:35 am
Location: AZ, NJ, NY, ND
Has thanked: 213 times
Been thanked: 341 times

Re: [Script] WME ChatJumper

Postby Fredo-p » Sun Jun 15, 2014 7:18 am

I've added a WME Chat section and this script to the Wiki addons page.

https://wiki.waze.com/wiki/Community_Plugins,_Extensions_and_Tools#WME_Chat_Addon
Image
ImageImageImageImageImageImage
WME βeta Tester
Waze Map Editor | Arizona Wiki | Waze Arizona G+
VZ Droid 4 |Waze v3.9.3.0
Fredo-p
Wiki Master
Wiki Master
 
Posts: 1207
Joined: Mon Aug 05, 2013 4:35 am
Location: AZ, NJ, NY, ND
Has thanked: 213 times
Been thanked: 341 times

Re: [Script] WME ChatJumper

Postby Fredo-p » Wed Aug 20, 2014 9:05 am

Is anyone else having issues trying to install Chat Jumper?
I keep getting a permission denied error.
Image
ImageImageImageImageImageImage
WME βeta Tester
Waze Map Editor | Arizona Wiki | Waze Arizona G+
VZ Droid 4 |Waze v3.9.3.0
Fredo-p
Wiki Master
Wiki Master
 
Posts: 1207
Joined: Mon Aug 05, 2013 4:35 am
Location: AZ, NJ, NY, ND
Has thanked: 213 times
Been thanked: 341 times

Re: [Script] WME ChatJumper

Postby Fredo-p » Wed Aug 27, 2014 1:47 am

AlanOfTheBerg wrote:Chat jumper is working fine for me. v.0.0.4, Win7, Chrome, Tampermonkey.

Its working for me as well. What we are talking about is that the link to install it is broken.

Sent from my DROID4 using Tapatalk
Image
ImageImageImageImageImageImage
WME βeta Tester
Waze Map Editor | Arizona Wiki | Waze Arizona G+
VZ Droid 4 |Waze v3.9.3.0
Fredo-p
Wiki Master
Wiki Master
 
Posts: 1207
Joined: Mon Aug 05, 2013 4:35 am
Location: AZ, NJ, NY, ND
Has thanked: 213 times
Been thanked: 341 times

Re: [Script] WME ChatJumper

Postby Fredo-p » Wed Aug 27, 2014 1:53 am

Anyone wanting to manually install it, here is version 0.0.7

Code: Select all
// ==UserScript==
// @name          WME Chat Jumper :)
// @description    Remeber current position before jump to new position from chat-user, and add button in chat window to jump back
// @namespace       http://pyrczak.pl
// @grant          none
// @grant          GM_info
// @version       0.0.7
// @include         https://www.waze.com/editor/*
// @include         https://www.waze.com/*/editor/*
// @include         https://editor-beta.waze.com/*
// @author         Pawel Pyrczak '2014
// @license         MIT/BSD/X11
// ==/UserScript==


/* Changelog
 * 0.0.7 - bugfix, more comatible with Chat addon writed by dummyd2
 * 0.0.6 - bugfix.
 * 0.0.5 - prevent from initializing again ChatJumper, when it is aleready initialized.
 * 0.0.4 - added presaving oryginal _onClick function, this may help with errors in future where oryginal function change
 * 0.0.3 - now zoom level is also saved and used when jumping back
 * 0.0.2 - position is saved also in localStorage, so it is remebered even if page is reloaded
 * 0.0.1 - initial version
 */


function ChatJumper_bootstrap()
{
   var bGreasemonkeyServiceDefined = false;
   
   try {
      var ver = window.navigator.appVersion.match(/Chrome\/(.*?) /)[1];
   } catch(err) {
      var ver = null;
   }
   if (null !== ver) {
      var itschrome = true;
      ///ver = "27.0.1438.7"; // last old working version
      // example: 32.0.1700.107
      // [0] - major versin
      // [2] - minor version
      ver = ver.split(".");
      ver[0] = parseInt(ver[0]);
      ver[2] = parseInt(ver[2]);
      if (ver[0] > 27) {
         var newmethod = true;
      } else if (ver[0] == 27) {
         if (ver[2] <= 1438) {
            var newmethod = false;
         } else {
            var newmethod = true;
         }
      } else {
         var newmethod = false;   
      }
   } else {
      var itschrome = false;
      var newmethod = false;
   }


   try
   {
      if ("object" === typeof Components.interfaces.gmIGreasemonkeyService)  // Firefox tells that "Components" is deprecated
      {
         bGreasemonkeyServiceDefined = true;
      }
    }   catch (err) { };

   try
   {
      if  ("object" === typeof GM_info)
      {
         bGreasemonkeyServiceDefined = true;
      }
    }   catch (err) { };   
   
   
   if ( "undefined" === typeof unsafeWindow  ||  ! bGreasemonkeyServiceDefined)
   {
      try {
         unsafeWindow    = ( function ()
         {
            var dummyElem   = document.createElement('p');
            dummyElem.setAttribute ('onclick', 'return window;');
            return dummyElem.onclick ();
         } ) ();
      }
      catch (err)
      {
         //Ignore.
      }
   }

   //And check again for new chrome, and no tamper(grease)monkey
   if ( itschrome && newmethod &&  !bGreasemonkeyServiceDefined)
   {
      //use "dirty" but effective method with injection to document
      var DLscript = document.createElement("script");
      DLscript.textContent ='unsafeWindow=window; \n'+ // need this for compatibility
      ChatJumper_init.toString()+' \n'+
      'ChatJumper_init();';
      DLscript.setAttribute("type", "application/javascript");
      document.body.appendChild(DLscript);   
      document.body.removeChild(DLscript);
   } else {
      /* begin running the code! */
      ChatJumper_init();
        ///setTimeout(ChatJumper_init,200);
   }
   
   
}



function ChatJumper_init() {
   if ("undefined" == typeof unsafeWindow) { unsafeWindow = window; }
    if ( "undefined" !== typeof unsafeWindow.W.Presenter.ChatUser.prototype._onClickChatJumper) {
        try { // in "try", because some browser may not have console.log
            console.log("(ChatJumper) ChatJumper is already initialized, stopping...");
        } catch(e) {}
        return false; // if ChatJumper is already initialized, stop initializing again.
    }
   
   
   ChatJumper =  {
      last: new Array(),
      isLast: false,
      isLSsupported: false,
      zoom: false
   };

   ChatJumper.init = function() {

    if ( "undefined" !== typeof unsafeWindow.W.Presenter.ChatUser.prototype._onClickChatJumper) {
        try { // in "try", because some browser may not have console.log
            console.log("(ChatJumper) ChatJumper is already initialized, stopping...");
        } catch(e) {}
        return false; // if ChatJumper is already initialized, stop initializing again.
    }
       
       // first presave oryginalcode
      unsafeWindow.W.Presenter.ChatUser.prototype._onClickChatJumper = unsafeWindow.W.Presenter.ChatUser.prototype._onClick;
      
      // then change it to new
      unsafeWindow.W.Presenter.ChatUser.prototype._onClick = function (e){
         var t;
         if (ChatJumper.isLast) { // Plese, dont erase Jump whet jumping again
         } else {
            var c = this.map.getCenter(); // Gets yours center of view and remeber it
            var zoom = this.map.getZoom(); // Gets zoom level
            ChatJumper.last = [c.lon,c.lat];
            ChatJumper.zoom = zoom;
            ChatJumper.isLast = true;
            ChatJumper.saveLS();
            ChatJumper.showButton(); //add in chat window new "back" button
         }
         this._onClickChatJumper(e)  };  /// call oryginal presaved function
         

         try { // check if localStorage is supported in this browser
            if ('localStorage' in window && window['localStorage'] !== null)
            this.isLSsupported = true;
         } catch (e) {
            this.isLSsupported = false;
         }
      this.loadLS();
      setTimeout(ChatJumper.loadTimer, 1000);
   }

   ChatJumper.loadTimer = function() {
      try {
         if ($("#chat .header")) {
            ChatJumper.showButton();

         } else {
            setTimeout(ChatJumper.loadTimer, 1000);
         }
      } catch(err) {
         setTimeout(ChatJumper.loadTimer, 1000);
      }
      
   }

   ChatJumper.loadLS = function() {
       if (this.isLSsupported) {
         
         try {
         if ("string" == typeof localStorage.ChatJumper) {
            var s = JSON.parse(localStorage.ChatJumper);
            this.isLast = s.isLast;
            this.last = s.last;
            if ("undefined" != typeof s.zoom) {
               this.zoom = s.zoom;
            }
         }
         
         } catch (err) {
            
         }
      }
   }

   ChatJumper.saveLS = function() {
       if (this.isLSsupported) {
         var s = {};
         s.isLast = this.isLast;
         s.last = this.last;
         s.zoom = this.zoom;
         localStorage.ChatJumper=JSON.stringify(s);
      }
   }

   ChatJumper.showButton = function() {
        if (!this.isLast) return; // dont know where to jump, so do nothing :( No jumps ;(
       
        try{
            if(document.getElementById('ChatJumper-JUMP') != null) return;
        }
        catch(e){ }
       
      var b = $('<button id="ChatJumper-JUMP" class="ChatJumper" style="float:none;color:#55ff55" title="JUMP" type="button">jump</button>');
      b.click (ChatJumper.JUMP);
      var c = $('<button id="ChatJumper-JUMP-clear" class="ChatJumper" style="padding-left:0px;float:none;color:red" title="Clear JUMP" type="button">X</button>');
      c.click (ChatJumper.Clear);
      $("#chat .header").append(b);
      $("#chat .header").append(c);
   }

   ChatJumper.JUMP = function(e) {
      if (!ChatJumper.isLast) return; // dont know where to jump, so do nothing :( No jumps ;(
      if (ChatJumper.zoom != false) {
         unsafeWindow.Waze.map.setCenter(ChatJumper.last,ChatJumper.zoom); // 3 ... 2 ... 1 ... JUMP !!!
      } else {
         unsafeWindow.Waze.map.setCenter(ChatJumper.last); // 3 ... 2 ... 1 ... JUMP !!!
      }
      ChatJumper.Clear();
   }

   ChatJumper.Clear = function(e) {
      ChatJumper.isLast = false;
      ChatJumper.saveLS();
      document.getElementById('ChatJumper-JUMP').parentNode.removeChild(document.getElementById('ChatJumper-JUMP'));
      document.getElementById('ChatJumper-JUMP-clear').parentNode.removeChild(document.getElementById('ChatJumper-JUMP-clear'));
   }

   ChatJumper.startcode = function () {
      // Check if WME is loaded, if not, waiting a moment and checks again. if yes init ChatJumper
      try {
         if ("undefined" != typeof unsafeWindow.W.Presenter.ChatUser ) {
            //this.console_log("ChatJumper ready to jump :)");
            this.init()
         } else {
            setTimeout(ChatJumper.startcode, 200);
         }
      } catch(err) {
            setTimeout(ChatJumper.startcode, 200);
      }
   }
   ChatJumper.startcode();
}


ChatJumper_bootstrap();
Image
ImageImageImageImageImageImage
WME βeta Tester
Waze Map Editor | Arizona Wiki | Waze Arizona G+
VZ Droid 4 |Waze v3.9.3.0
Fredo-p
Wiki Master
Wiki Master
 
Posts: 1207
Joined: Mon Aug 05, 2013 4:35 am
Location: AZ, NJ, NY, ND
Has thanked: 213 times
Been thanked: 341 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: lg1992, randyboy