@@ -19,14 +19,24 @@ static class NoMoreEdge
19
19
{
20
20
21
21
[ STAThread ]
22
+ static string urlmod ( string url )
23
+ {
24
+ url = url . Replace ( "%3A" , ":" ) ;
25
+ url = url . Replace ( "%3D" , "=" ) ;
26
+ url = url . Replace ( "%2F" , "/" ) ;
27
+ url = url . Replace ( "%3F" , "?" ) ;
28
+ url = url . Replace ( "%25" , "%" ) ;
29
+ url = url . Replace ( "%26" , "&" ) ;
30
+ return url ;
31
+ }
22
32
static string urlType ( string url )
23
33
{
24
34
string urltype = "" ;
25
- if ( url . Contains ( "Microsoft.Windows.Search" ) && url . Length > 116 )
35
+ if ( url . Contains ( "Microsoft.Windows.Search" ) && ! url . Contains ( "redirect" ) && url . Contains ( "bing" ) )
26
36
{
27
37
urltype = "searchword" ;
28
38
}
29
- else if ( url . Contains ( "Microsoft.Windows.Search" ) && url . Length < 116 )
39
+ else if ( url . Contains ( "Microsoft.Windows.Search" ) )
30
40
{
31
41
urltype = "searchurl" ;
32
42
}
@@ -44,21 +54,15 @@ static string widgetsurl(string url)
44
54
{
45
55
46
56
url = url . Substring ( url . IndexOf ( "https" ) , url . Length - url . IndexOf ( "https" ) ) ;
47
- url = url . Replace ( "%3A" , ":" ) ;
48
- url = url . Replace ( "%3D" , "=" ) ;
49
- url = url . Replace ( "%2F" , "/" ) ;
50
- url = url . Replace ( "%3" , "?" ) ;
57
+ url = urlmod ( url ) ;
51
58
Console . WriteLine ( url ) ;
52
59
return url ;
53
60
}
54
61
static string searchurl ( string url )
55
62
{
56
63
Console . WriteLine ( url ) ;
57
64
url = url . Substring ( url . IndexOf ( "http" ) , url . Length - url . IndexOf ( "http" ) ) ;
58
- url = url . Replace ( "%3A" , ":" ) ;
59
- url = url . Replace ( "%3D" , "=" ) ;
60
- url = url . Replace ( "%2F" , "/" ) ;
61
- url = url . Replace ( "%3" , "?" ) ;
65
+ url = urlmod ( url ) ;
62
66
Console . WriteLine ( url ) ;
63
67
return url ;
64
68
}
@@ -85,7 +89,7 @@ static void Main(string[] args)
85
89
//string url = "microsoft-edge://https://www.google.com";
86
90
//string url = "microsoft-edge:?upn=abc%40gmail.com&cid=8208f3b1a83e496b&source=Windows.Widgets×tamp=1637894205027&url=https%3A%2F%2Fwww.msn.com%2Fen-in%2Fmoney%2Fnews%2Fblack-friday-sale-here-are-the-top-deals-on-iphones-oneplus-and-other-phones-you-can-t-miss%2Far-AAR82bF%3Focid%3Dwinp2octtaskbar";
87
91
//string url = "microsoft-edge:?launchContext1=Microsoft.Windows.Search_cw5n1h2txyewy&url=http%3A%2F%2Fwww.amazon.in%2F";
88
- //string url = "microsoft-edge:?upn=abc%40gmail.com&cid=8208f3b1a83e496b&source= Windows.Widgets×tamp=1637941810457& url=https%3A%2F%2Fgo.microsoft .com%2Ffwlink% 2F%3Flinkid%3D2163242 ";
92
+ //string url = "microsoft-edge:?launchContext1=Microsoft. Windows.Search_cw5n1h2txyewy& url=https%3A%2F%2Fwww.bing .com%2FWS%2Fredirect% 2F%3Fq%3Damazon.in%26url%3DaHR0cHM6Ly93d3cuYW1hem9uLmluL2luZGlhL3M%2Faz1pbmRpYQ%3D%3D%26form%3DWSBSTK%26cvid%3D7d3f9448e5de4260b68819b9887a9558%26rtk%3DSpSsrrKyXsxfoGahqv98I%252Fi3xOUBG9SnOILgundIYa8%252F1q%252Ffzsod5efeoSd94FDq ";
89
93
90
94
91
95
if ( args . Length < 2 )
0 commit comments