From d5106de4ee207b2427c1c98e0761c4703094c80f Mon Sep 17 00:00:00 2001 From: justins83 Date: Mon, 6 Mar 2023 13:59:42 -0500 Subject: [PATCH] Update WMEPIE.js Fixing 12th item bug (hopefully) fixing hours parser display --- WMEPIE.js | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/WMEPIE.js b/WMEPIE.js index e2b79ef..ed1c3a8 100644 --- a/WMEPIE.js +++ b/WMEPIE.js @@ -1,13 +1,14 @@ // ==UserScript== // @name WME Place Interface Enhancements // @namespace https://greasyfork.org/users/30701-justins83-waze -// @version 2022.11.17.03 +// @version 2023.03.03.01 // @description Enhancements to various Place interfaces // @include https://www.waze.com/editor* // @include https://www.waze.com/*/editor* // @include https://beta.waze.com/editor* // @include https://beta.waze.com/*/editor* // @exclude https://www.waze.com/user/editor* +// @exclude https://www.waze.com/dashboard/editor // @icon data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAEAAQADAREAAhEBAxEB/8QAHQABAAEFAQEBAAAAAAAAAAAAAAUBAwQGBwIICf/EAEAQAAICAQICBQgHBwQCAwAAAAABAgMEBREGMRIhQVFhBxMUIjJScYEXI0JUkZLBCBVVYpOhsRYzcoJEolPR4f/EABsBAQACAwEBAAAAAAAAAAAAAAADBAECBgUH/8QAMBEBAAIBAgUBCAEEAwEAAAAAAAECAwQRBRIhMVFBBhMiMmFxkdGBFCOhsVLB4fD/2gAMAwEAAhEDEQA/AP1TAAAAAAAAAAAAAAAAAAADwrFJtR9bbm+wyxu9mGQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY+Vm04cd7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atePlaceSizeDisplay(); AddPlaceCategoriesButtons(); - AddHoursParserInterface(); + delayFire(250, AddHoursParserInterface); + //AddHoursParserInterface(); AddMakePrimaryButtons(); if(settings.ShowPlaceLocatorCrosshair) ShowPlaceLocatorCrosshair(); @@ -869,7 +871,8 @@ var UpdateObject, MultiAction; /******** Hours Parser ************/ registerEvents(AddHoursParserInterface); - AddHoursParserInterface(); + delayFire(150, AddHoursParserInterface); + //AddHoursParserInterface(); registerEvents(AddMakePrimaryButtons); @@ -1444,6 +1447,7 @@ var UpdateObject, MultiAction; } function AddHoursParserInterface(){ + //debugger; if(WazeWrap.hasPlaceSelected()){ var $PIEHoursParser = $("
", {style:"min-height:20px"}); if(!$('#PIEHoursParserDiv').length){ @@ -1455,7 +1459,11 @@ var UpdateObject, MultiAction; '', '
' ].join(' ')); - $('.opening-hours > div > .add.waze-btn').parent().append($PIEHoursParser.html()); + var appendDiv = (function() { + $('.opening-hours-add').parent().append($PIEHoursParser.html()); + }); + delayFire(150, appendDiv); + $('#PIEAppendHours').click(function(){ addHours(false);}); $('#PIEReplaceHours').click(function(){ addHours(true);}); @@ -2234,6 +2242,11 @@ var UpdateObject, MultiAction; setTimeout(editRPPAddress, 50); } + async function delayFire(ms, func){ + await new Promise(r => setTimeout(r,ms)); + func(); + } + async function editRPPAddress(rppTries = 1){ if ($('.address-edit-view').length > 0) { $('.full-address').trigger("click"); @@ -3642,6 +3655,8 @@ var UpdateObject, MultiAction; settings[prop] = defaultSettings[prop]; }*/ settings = $.extend({}, defaultSettings, loadedSettings); + if(settings.NewPlacesList.length < 12) + settings.NewPlacesList.push('RESIDENCE_HOME'); let serverSettings = await WazeWrap.Remote.RetrieveSettings("WME_PIE"); if(serverSettings && serverSettings.lastSaved > settings.lastSaved)